Xfce

Subdomains
 

icon path cache

  • July 2, 2005
  • Edscott

An icon-path cache for theme icons does speed things up. The problem comes when one of the icon directories suffers modifications, because that means the icon cache needs to be regenerated. To check whether the cache need to be regenerated, look at the directories and see if they are modified. If you do this twice in a row, as when programming the algorithm, the check is quick because linux will save the directories in memory. Do it again tomorrow and it will take longer. So an acceptable solution —for xffm at least— is to use whatever cache is available and fork a separate process to check whether the cache needs regeneration. The separate process will regenerate the cache if necessary. And chances are that the active xffm will not need cache data until it is already regenerated behind the scenes. After several weeks of testing it works fine. I’m pretty happy with it because of the significant reduction in startup time.