Winstep

Software Technologies


 Winstep Forums


Print view
Board index : Winstep Forums : General Discussion  [ 5 posts ]
Author Message
 Post subject: Slow Sub-Dock on first clicks
PostPosted: Wed Apr 06, 2011 2:47 pm 
Offline

Joined: Mon Apr 04, 2011 3:54 pm
Posts: 9
I've searched the forums for Slow Sub-Docks. No help.

On a decent Lenovo laptop... with dual core, lots of ram, Win7, Nexus Ultimate, etc...

Scenerio: I don't access the Nexus menu for a while. Then I need to access an app in a Sub-Dock (example, Microsoft Word). I click the Microsoft Office Sub-Dock icon. After clicking it, I need to wait nearly 8-10 seconds before it's displayed. If I click it again, it shows up immediately. Now I click my Utilities Sub-Dock. I need to wait for it too. Go back to Microsoft Office Sub-Dock. It opens right up. Go back to work and try this again later, all the delays are there again. Seems like they need to cache themselves or something. Then after a period of time, the cache is flushed.

I have 6 Sub-Docks defined. Each with around 5 - 8 icons in them. If I simply slick Sub-Dock icon after Sub-Dock icon, they're all extremely responsive to open and close after they've been displayed once.

Any ideas? Can I test anything for you?


Back to top
 Profile  
 
 Post subject: Re: Slow Sub-Dock on first clicks
PostPosted: Wed Apr 06, 2011 10:27 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 12285
Get a faster hard drive for your laptop. :wink:

Seriously now, that's probably a cache issue related to retrieving the icons on the sub-dock. Here is what I think is happening:

Docks that are currently open, and the Shelf, cache icons in memory. This is why it takes longer to open a Shelf tab the first time you access it, as all those icons need to be retrieved from disk. The slower your hard drive and the more items you have on that tab, the longer it takes.

The Shelf has an added mechanism to deal with this: after x milliseconds (i.e.; if it takes too long to open that tab), it will start displaying a generic icon for all the items that it hasn't been able to retrieve the correct icon for yet. Then, in the background, it will replace those generic icons with the proper icons as fast as it retrieves them.

Once all icons have been retrieved for a tab, they are cached in memory. The second time you access that tab, the Shelf no longer needs to retrieve them from disk and the tab opens an order of magnitude faster.

As a side note, changing the icon size of the Shelf and certain system events flush the internal icon cache.

Now, docks also cache icons in memory, but because they are always open they do not have that temporary 'generic icon' mechanism to smooth things out if it takes it too long to retrieve all the icons.

When a dock is closed, its icon cache is discarded. Not a problem with the 'parent' docks because they are usually never closed (even when hidden beyond the screen edge).

Sub-docks, on the other hand, get destroyed when you close them (and there goes their internal icon cache when that happens).

Now, Windows itself also has a file cache. When you open a sub-dock, Windows caches the files the sub-dock accessed in order to retrieve the icons. Even though the sub-dock's icon cache is destroyed when you close it, the Windows file cache still holds those files in memory, and will for a time.

But, as you work on your system, the contents of that file cache are gradually replaced with other stuff. So, after a while, all the icons will need to be retrieved from disk again when you open a sub-dock.

Of course, it never occurred to me people might run into this issue with sub-docks.

To solve this I will need to apply the same technique used for the Shelf: if it's taking too long to render all the icons in a dock or sub-dock, render a generic icon instead and then later replace it with a proper icon. This way the sub-dock will open nearly instantly and users will be able to work on it even if it's still busy retrieving the actual icons from disk.

You will have to wait for the next release, though.

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: Slow Sub-Dock on first clicks
PostPosted: Thu Apr 07, 2011 11:20 am 
Offline

Joined: Mon Apr 04, 2011 3:54 pm
Posts: 9
The thorough explaination is much appreciated.


Back to top
 Profile  
 
 Post subject: Re: Slow Sub-Dock on first clicks
PostPosted: Thu Apr 07, 2011 11:39 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 12285
Thanks. Was afraid you might fall asleep halfway through it. :wink:

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: Slow Sub-Dock on first clicks
PostPosted: Sat Apr 30, 2011 6:42 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 12285
I think you'll be happy to know that I've just implemented the mechanism I described above to docks. A sub-dock should now take, at most, between 400 to 500 ms to open (half a second tops), regardless of how slow the source of the icon images is.

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
Post new topic Reply to topic Board index : Winstep Forums : General Discussion  [ 5 posts ]
Display posts from previous:  Sort by  

Who is online

Users browsing this forum: Google [Bot] and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron