[Lazarus] startlazarus and memory consumption

Brad Campbell brad at wasp.net.au
Thu Jul 16 10:06:00 CEST 2009


waldo kitty wrote:
> ya know... i guess being so much old school as i am but i still fail to 
> really understand why a "splash screen" is really necessary for much of 
> anything... especially if it causes the app to consume a lot more memory 
> than truly necessary...

I used to think a little like that, but recently I added a splash screen to my application and a 
whole host of users were much happier.

My application populates a directory tree while it's loading. On systems with slow network links 
this can take a significant amount of time (up to 25 seconds on OSX over a slow network to an SMB 
server). Fstat calls seem to be quite expensive on OSX compared to linux, particularly over the network.

Putting a splash screen up stopped all the complaints of "It takes _ages_ to load". The funny thing 
it is takes precisely the same amount of time to load to a point of fully functional now, but the 
users all said "Wow you sped up the loading *heaps*". It's a little psychological I guess. The 
splash screen pops up very quickly and that seems to keep people placated while the slow stuff 
happens. I don't even have a progress indicator or anything "flashy, smelly or dangly" for them to 
look at.

Also, on OSX, the act of displaying the screen and polling the application event loop stops the app 
icon bouncing in the dock, so it looks like its loading faster there also. (An unexpected side effect)

Brad
-- 
Dolphins are so intelligent that within a few weeks they can
train Americans to stand at the edge of the pool and throw them
fish.




More information about the Lazarus mailing list