Page 1 of 1

VLC 2.0 for OS X - why font cache rebuild every session?

Posted: 20 Feb 2012 18:35
by Chrisj1960
I just upgraded to VLC 2.0 on my Mac running OS X Lion 10.7.3. I now observe that the first time I launch VLC after logging in it rebuilds the font cache; it does not do this for subsequent launches within the same login session. Is this normal/expected? It takles maybe 60 seconds to do and so is somewhat disruptive. The previous version of VLC used to only do this once after an upgrade.

Thanks,

Chris

Re: VLC 2.0 for OS X - why font cache rebuild every session?

Posted: 20 Feb 2012 18:41
by Jean-Baptiste Kempf
No, it should do it only once.

Re: VLC 2.0 for OS X - why font cache rebuild every session?

Posted: 20 Feb 2012 18:42
by ChrisX
Noticed that, too. If there's a pref to switch it off, I haven't found it yet. If not -> another bug. I'm starting to get the impression that the OS X release for 2.0 was a bit premature.

Re: VLC 2.0 for OS X - why font cache rebuild every session?

Posted: 20 Feb 2012 22:28
by nkoriyama
It's already fixed on 2.0.1. So you will not see the dialog. except when the font cache really rebuild.

Re: VLC 2.0 for OS X - why font cache rebuild every session?

Posted: 26 Mar 2012 09:01
by Chrisj1960
I've upgraded to 2.0.1 but I still see this behaviour. My Mac is part of an Active Directory domain and all the users have 'Mobile' profiles. This means that for each such user ~/Library/Caches gets cleared out on every logoff. Seems like VLC may (probably incorrectly) be storing it's 'font cache' in that location? I have a similar issue with some other software (Evernote) and they are now implementing a fix (moving the note database to a different location).

Chris

Re: VLC 2.0 for OS X - why font cache rebuild every session?

Posted: 26 Mar 2012 12:03
by nkoriyama
@Chrisj1960
The cache directory is ~/Library/Cache/fontconfig. So, on your environment, you see the window once again after logoff.
Many softwares use cache folder under ~/Library/Cache and are not configurable.
I think this behavior is not "incorrect".

Re: VLC 2.0 for OS X - why font cache rebuild every session?

Posted: 26 Mar 2012 13:16
by Chrisj1960
@nkoriyama

Perhaps 'incorrect' is too strong a word. This location is fine for:

1. Any Mac user with a normal (i.e. not Mobile) profile.

2. Storage of any files that do not need to gbe uaranteed to persist across login sessions.

Apple seem to have mandated that, for users with Mobile profiles, ~/Library/Cache gets discarded on every logout. This does not seem to be configurable :(

I guess the choice is to do nothing and have VLC continue to exhibit thss annoying behaviour for any users who have Mobile profiles (i.e. most users who log into their Macs with some kind of network account) or to relocate the font cache to some other, fully persistent, location and make everyone happy... As you say, various pieces of software use this location. Evcernote is one of them; it has the same issue. I reported it to them and we diagnosed what was happenning. They tell me that they are planning to make some changes to avoid this issue.

At the end of the day it isn't the end of the world for me, just rather irritating.

Chris

Re: VLC 2.0 for OS X - why font cache rebuild every session?

Posted: 26 Mar 2012 16:43
by nkoriyama
Apple seem to have mandated that, for users with Mobile profiles, ~/Library/Cache gets discarded on every logout. This does not seem to be configurable :(
I don't know you can configure or you can't. Please ask your system administrator.
As you say, various pieces of software use this location. Evcernote is one of them; it has the same issue. I reported it to them and we diagnosed what was happenning. They tell me that they are planning to make some changes to avoid this issue.
Please tell me what was the problem of Evernote? What type of the data stored in ~/Library/Cache?

At the moment, you can avoid this issue by creating symlink like:

Code: Select all

rm -rf ~/Library/Caches/fontconfig mkdir -p ~/blah/blah/blah/Caches/fontconfig ln -s ~/blah/blah/blah/Caches/fontconfig ~/Library/Caches/fontconfig
Put it on your login script.

Re: VLC 2.0 for OS X - why font cache rebuild every session?

Posted: 26 Mar 2012 18:34
by Chrisj1960
I don't know you can configure or you can't. Please ask your system administrator.
I am the System Administrator :-) I've tried to find some information on this in various places including Apple's own Developer web-site but so far I haven't found anything useful.
Please tell me what was the problem of Evernote? What type of the data stored in ~/Library/Cache?
I'm afraid I am not totally sure. The Evernote support person didn't say specifically what they store there. All I know is that because that information gets removed between sessions, the first time one starts Evernote after logging in one gets a progress bar that says 'Migrating Notes from previous version' which disappears after several seconds.
At the moment, you can avoid this issue by creating symlink like:

Code: Select all

rm -rf ~/Library/Caches/fontconfig mkdir -p ~/blah/blah/blah/Caches/fontconfig ln -s ~/blah/blah/blah/Caches/fontconfig ~/Library/Caches/fontconfig
Put it on your login script.
Thanks, this symlink workaround seems to do the trick. I'll run with this for now.

Looking at the documentation on the Apple Developer web-site, it seems to me that although 'fontconfig' is apparently some kind of 'cache' it might be better stored in ~/Library/Application Support instead of ~/Library/Caches.

Re: VLC 2.0 for OS X - why font cache rebuild every session?

Posted: 26 Mar 2012 19:28
by nkoriyama
Looking at the documentation on the Apple Developer web-site, it seems to me that although 'fontconfig' is apparently some kind of 'cache' it might be better stored in ~/Library/Application Support instead of ~/Library/Caches.
Thank you for the information.
But ~/Library/Application Support is suitable for storing configuration files, static data(dictionary, script, template file) or so.
Although we will consider about the issue.
ATM, the cache directory is configured when building fontconfig library. So, we cannot easily change.

Re: VLC 2.0 for OS X - why font cache rebuild every session?

Posted: 27 Mar 2012 11:43
by Chrisj1960
Thank you for the information.
But ~/Library/Application Support is suitable for storing configuration files, static data(dictionary, script, template file) or so.
Although we will consider about the issue.
ATM, the cache directory is configured when building fontconfig library. So, we cannot easily change.
Looking at the current Apple OS X Developer documentation it says this about ~/Library/Caches (emphasis is mine):

Contains cached data that can be regenerated as needed. Apps should never rely on the existence of cache files. Cache files should be placed in a directory whose name matches the bundle identifier of the app.

Similarly for ~/Library/Application Support:

Contains all app-specific data and support files. These are the files that your app creates and manages on behalf of the user and can include files that contain user data.

I don't see anythign stated here that would prohibit placing the 'font cache' in the Application Support directory. Given that if the font cache doesn't exist VLC will rebuild it, the rebuild can take significant time and VLC won't do anythign else until it has been rebuilt I would say that VLC is relying on the existence of the font cache and as such this is not somehting that shoudl be stored in ~/Library/Caches. Of course that is just my opionion...

Re: VLC 2.0 for OS X - why font cache rebuild every session?

Posted: 27 Mar 2012 12:34
by Jean-Baptiste Kempf
Patch it to remove fontconfig :)

Re: VLC 2.0 for OS X - why font cache rebuild every session?

Posted: 29 Mar 2012 12:59
by northernangler
OK let me get this clear, before the update I did not have to wait for a font cache. After the update I do.

Seem obvious to me. Find the problem by comparing the old with the new. I am not a programmer but this would be normal procedure for most problems

Re: VLC 2.0 for OS X - why font cache rebuild every session?

Posted: 29 Mar 2012 14:00
by Jean-Baptiste Kempf
OK let me get this clear, before the update I did not have to wait for a font cache. After the update I do.

Seem obvious to me. Find the problem by comparing the old with the new. I am not a programmer but this would be normal procedure for most problems
Thank you captain obvious!

Re: VLC 2.0 for OS X - why font cache rebuild every session?

Posted: 02 May 2012 08:28
by GageGecko
Image

I have had to revert back to 1.1.12 because I think it's ridiculous that the current version has to build a font cache every time I attempt to use VLC if the computer has been restarted since VLC was last used.

Since removed 2.0.1 and reverting to the old version, not once has VLC made me wait to use it while it builds a font cache.

Re: VLC 2.0 for OS X - why font cache rebuild every session?

Posted: 10 Jun 2012 22:45
by fkuehne
Just FYI: The font cache is removed in VLC 2.0.2, which will be available shortly. However, VLC will still find all your fonts, just without the cache :-)