[KimDaBa] Profiling Kimdaba startup

Jesper K. Pedersen blackie at blackie.dk
Tue Jan 4 06:46:37 GMT 2005


Robert, thx for your profiling.
As it looks now, I can't see that there are any thing else I can do to speed 
up things, except rewritting to a real database.
Well I could delay loading the plugins, but it is a constant of 500msec in 
your profiling, so I don't see much gained there either.

Rewritting to a real db would be a huge job, and currently I dont see it worth 
it to save at most 2.5+1=3.5 secs. People with 50.000 images might disagree, 
but we aren't really there yet (at least that is not what I hear from most 
kimdaba users), and once we are there, computers are likely so much faster 
that the 25 secs has gone done.

Cheer
Jesper
On Tuesday 04 January 2005 02:29, Robert L Krawitz wrote:
| I put some very rough profiling code in Kimdaba to measure the startup
| overhead (I also valground it, and I can provide the binary and the
| callgrind.out file if anyone cares).  This is on a 1 GHz Pentium 3,
| with 6700 images, run a second time to bring everything into memory.
|
| Note that the big consumers are:
|
| 1) setContent() (the Qt call to slurp in the index.xml file) -- this
|    takes about 2.5 seconds.  This time is proportional to the size of
|    the index.xml file (which presumably is roughly proportional to the
|    number of images).
|
| 2) Setting up the image database in memory (groveling the big data
|    structure) -- about 1 second.  This too is proportional to the
|    number of images.
|
| 3) Setting up the UI -- about 3 seconds.  This time is constant.
|
| The total is about 9 seconds.
|
| A 6700 image database takes about 3.5 seconds to read at present; a
| 50,000 image database would take about 8 times as long, or about 25
| seconds on a 1 GHz machine.  On a 3 GHz or equivalent machine,
| presumably it would take about 8 seconds, and setting up the UI would
| take about 1 second, for a 10 second startup time.  This falls in the
| nuisance category, but there are plenty of other things that take that
| long or longer to start.
|
| Entering main				       20:19:51.377
| Added command line options                     20:19:51.386
| kimdaba: Create splash screen		       20:19:51.785
| kimdaba: Show splash screen		       20:19:52.057
| kimdaba: Register formats		       20:19:52.064
| kimdaba: Calling MainView::MainView	       20:19:52.071
| kimdaba: About to call MainView::load	       20:19:52.100
| kimdaba: MainView::load() at		       20:19:52.178
| kimdaba: About to check for config file at     20:19:52.183
| kimdaba: Calling setContent at		       20:19:52.188
| kimdaba: Called setContent at		       20:19:54.671
| kimdaba: Getting top element		       20:19:54.672
| kimdaba: Parsing header			       20:19:54.675
| kimdaba: Parsed header			       20:19:54.678
| kimdaba: Setting options		       20:19:54.681
| kimdaba: Setting up image db		       20:19:54.685
| kimdaba: Done setting up image db	       20:19:55.863
| kimdaba: Done calling MainView::load	       20:19:56.361
| kimdaba: Connecting Options::instance	       20:19:57.084
| kimdaba: Creating top			       20:19:57.086
| kimdaba: Creating stack			       20:19:57.089
| kimdaba: Creating date bar		       20:19:57.092
| kimdaba: Creating line			       20:19:57.098
| kimdaba: Creating browser		       20:19:57.100
| kimdaba: Creating thumbnail view	       20:19:57.110
| kimdaba: Adding widgets to stack	       20:19:57.121
| kimdaba: Setting up menu bar		       20:19:57.123
| kimdaba: Setting up search tool bar	       20:19:57.183
| kimdaba: Setting up status bar		       20:19:57.194
| kimdaba: Setting up indicators		       20:19:57.198
| kimdaba: Setting up locked indicator	       20:19:57.245
| kimdaba: Setting up partial image counter      20:19:57.255
| kimdaba: Setting up total image counter	       20:19:57.258
| kimdaba: Setting up auto save timer	       20:19:57.260
| kimdaba: Starting timer			       20:19:57.262
| kimdaba: Started timer and connecting signals  20:19:57.265
| kimdaba: Setting total			       20:19:57.267
| kimdaba: Welcome to KimDaBa		       20:19:57.273
| kimdaba: Done with MainView::MainView	       20:19:57.274
| kimdaba: Called MainView::MainView	       20:19:57.277
| kimdaba: Calling setMainWidget		       20:19:57.280
| kimdaba: Exec'ing app			       20:19:57.282
| kimdaba: In MainView::delayedInit	       20:19:59.343
| kimdaba: Loading plugins		       20:19:59.355
| KIPI (loading): Plugin_Mpegencoder plugin loaded
| kimdaba: Done loading plugins		       20:19:59.815
| kimdaba: Processing events		       20:19:59.828
| kimdaba: Searching for images		       20:19:59.837
| kimdaba: Done searching for images	       20:19:59.838
| kimdaba: Showing main window		       20:19:59.993
| kimdaba: Done showing main window	       20:20:00.010
| kimdaba: Done parsing args		       20:20:00.011
| kimdaba: Done in delayedInit		       20:20:00.014
| kimdaba: Done with app			       20:20:00.573
| kimdaba: Deleted view			       20:20:00.849

-- 
Having trouble finding a given image in your collection containing
thousands of images?

http://ktown.kde.org/kimdaba might be the answer.



More information about the Kphotoalbum mailing list