You are not logged in.

#1 2008-12-18 08:00:52

VPeric
Member
Registered: 2008-09-01
Posts: 11

Timing opening time of PNG files?

I'm trying to time how long it takes to just open various PNG files. I figured I could use the "time" command from the command line, followed by "eog name.png" but I don't know how to close the application as soon as it starts, making the results moot (because they rely on me pressing Alt-F4 very fast indeed). How can I do this from the command line? Other suggestions also welcome. smile

Thanks!

Offline

#2 2008-12-18 08:20:49

Zeist
Arch Linux f@h Team Member
Registered: 2008-07-04
Posts: 532

Re: Timing opening time of PNG files?

The problem is differentiating when the image is loaded as opposed to when the process is started

Last edited by Zeist (2008-12-18 08:25:34)


I haven't lost my mind; I have a tape back-up somewhere.
Twitter

Offline

#3 2008-12-18 13:41:25

VPeric
Member
Registered: 2008-09-01
Posts: 11

Re: Timing opening time of PNG files?

Not really - I'm going to have a "control image", against which others will get measured (ie. how much faster/slower they start up).

Offline

#4 2008-12-18 17:45:25

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,563

Re: Timing opening time of PNG files?

What is your objective? Timing libpng? Or are you trying to time different applications? How's this as an example, where foo is the app to open the PNG:

'time (foo image.png && killall foo)'

Of course, this also measures start time for the app... wouldn't be too bad if you're using something like feh... or if you're just trying to see how much more work it takes to open a bigger / whatever PNG, because the overhead is constant... you could time ImageMagick doing an 'identify' on the PNG, too... not sure if that would be more or less than a simple view - it won't display an image on the screen, which means less overhead, but at the same time that might be relevant and not overhead... etc...

Best way would be to code a simple app that goes through the motions of opening a PNG with libpng, but doesn't display it, and immediately exits, and you could time that.

Last edited by Ranguvar (2008-12-18 17:47:28)

Offline

#5 2008-12-20 09:43:53

VPeric
Member
Registered: 2008-09-01
Posts: 11

Re: Timing opening time of PNG files?

Ranguvar wrote:

'time (foo image.png && killall foo)'

Nope, doesn't work, at least not with eog and the feh program you mentioned - the viewer opens, but doesn't close.

I'm not sure I could handle just coding it, and that's probably more effort than I'd want to put into this.

Offline

Board footer

Powered by FluxBB