Closed certik closed 8 years ago
I think the main bottleneck is starting the JVM. Would it help if the program was able to convert multiple images in one run?
I was thinking of using your program to write something like the Gnome's eog
program for a terminal. So the user presses left/right arrows, and it shows the next image, in a curses app. So it's be nice to somehow make this run a lot faster. I don't know what the options are with JVM.
I could add a parameter that would make the program read image names from stdin, this would allow you to keep the process running? Real solution probably would be to port the code to C or C++....
I think that would work. Thanks!
Indeed, I was thinking of porting this to C++, but since you already did the work, I wanted to use your code if we can make it run a bit faster.
Sent from my mobile phone. On Jul 10, 2016 6:56 AM, "Stefan Haustein" notifications@github.com wrote:
I could add a parameter that would make the program read image names from stdin, this would allow you to keep the process running? Real solution probably would be to port the code to C or C++....
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stefanhaustein/TerminalImageViewer/issues/6#issuecomment-231587685, or mute the thread https://github.com/notifications/unsubscribe/AABQWHtX5WVmAHOwWelT84NF0IOLdlKLks5qUOwXgaJpZM4JIemR .
Ok, this should work now (haven't really tested) O:)
Please reopen or create a new bug if you run into any issues.
Thanks @stefanhaustein. In the meantime, I created a terminal image viewer using your old code: https://gist.github.com/certik/5158d45b9d1c99b9dbe988dd0f12b228, it's just a simple script that allows you to browse the images in the directory that you give it on a command line. I am now at the SciPy 2016 conference, I'll show it to other people and see what they think.
GitHub lost my gist... It now says 404 not found. Anyway, I reposted it here: https://gitlab.com/snippets/22365
Thanks for this great app. The images look really awesome. I use Ubuntu 16.04, and a gnome-terminal.
A problem that I noticed is that the program is slow. It takes over a second to render a simple image. As you can see below, I also try to render it to a file (over a second), and then just plot it using
cat log
. And just catting the file is immediate. So it's not he terminal slowing things down, it's the Java program.Do you know what the bottleneck is and if there is a way to speed it up?
P.S. When you copy and paste from the terminal, you lose the color, so it's hard to see, but you can see the timings at least.