28.17.0 - New/fresh profiles cache issue Topic is solved

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
Pyrynd

28.17.0 - New/fresh profiles cache issue

Unread post by Pyrynd » 2020-12-22, 15:15

The cache doesn't seem to be indexed properly after each session.

I'm not sure how to call it properly, but basicaly if you visited a website or two, to get cache going, and then restarted Pale Moon and look in about:cache the size of the disk cache will be precisely... 0
(assuming the home page is set to about:home).
The cache2 folder is missing 2 index files (index & index.log) on fresh profiles. Also after each session the cache.trash* folders seems to be piling up (precisely 12 MB in size, each of them).

This problem seems to affect fresh profiles, and existing profile copies. Basicaly any profile that don't have corresponding cache folder in appdata/local/... created in the past.
As for how much in the past? One of my test profiles was definately created pre 28.17 (28.16 or 28.15 I think) has the exact problem.

Copying entire cache folder (randomstring.profilename in appdata/local/...) of an older profile (without this issiue) in to a affected one... kind of works.
At least about:cache doesn't show 0 after each session, even after clearing the cache through the browser UI.
But the index files (in cache2 folder) (at least if I remember correctly) stay the exact same size as before the cache clear (although this might be some quirk in windows explorer, or perhaps I'm starting to loose my mind...).
Shouldn't the index file(s) get deleted after the clear?

I'm not sure if it is something just on my end, but if it's not, then it should be easily reproduciable.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35473
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: 28.17.0 - New/fresh profiles cache issue

Unread post by Moonchild » 2020-12-22, 17:13

Created a new profile to test. No problem.
Is some overzealous antisoftwarevirus interfering, perhaps?

It would probably help -- if you can reproduce it -- to list the exact steps to reproduce. Leave nothing out. How exactly did you create the new profile? etc.
Attachments
cacheworksfine.png
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Pyrynd

Re: 28.17.0 - New/fresh profiles cache issue

Unread post by Pyrynd » 2020-12-22, 19:15

1. Open the profile manager - I'm using the shortcut with "-P" argument
2. Create new profile (I tend to keep the profile names under 4 characters, if it makes any difference)
3A. Run the new profile through the profile manager...
3B. ...or close it and run the shortcut with -P "profilename" (both options produce the same result for me)
4. (close the default browser popup) Wait for the 2 default tabs to load, then close them.
5. Open preferences and and clear the homepage field (so it's starting with about:home) and apply it.
6. Go to about:cache (it shows couple of entries (the 2 tabs loaded at first run)).
7. Close Pale Moon
8. (I usualy do it quite fast, not sure if it will make a difference) Open the browser again
9. Go to about:cache right away - it's going to show 0

The weird thing is, as I was re-tracing the steps to make this list... (most importantly to make sure that I'm not going crazy)
If I wait a bit, a minute or so, on the nr 9 and then hit the refresh button (or just close this tab and open it again) - the cache appears, exactly as it was at step nr 6 (+1-2 entries - the addon blacklist gets cached usualy at this point),
But the if I close it and perform steps 8 & 9... about:cache will show 0 aand after about a minute it will re-appear again (after refreshing it that is).

It seem that if I perform steps 8 & 9 and close the browser before the cache show up - I'll get the cache.trash* folders

The "cached web content" under preferences -> advanced -> network also shows 0 during this weird time.

This is a non issue for my older profiles, doing steps 8 & 9 shows the cache right away, even after clearing it through the UI (history -> clear recent...) and then 8 & 9 again - it's fine.
Moonchild wrote:
2020-12-22, 17:13
Is some overzealous antisoftwarevirus interfering, perhaps?
Possibly... I'll report back if I find that to be the case.

Also: Win10 20H2

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35473
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: 28.17.0 - New/fresh profiles cache issue

Unread post by Moonchild » 2020-12-22, 20:50

Ah, well this sequence and additional info is essential :)

Actually, the cache data not immediately showing up (and only showing after a minute) is by design. The network caching components aren't immediately initialized when the browser starts up (as they are expensive to spin up and would slow down the browser's initialization), unless you make a network request (which about:home does not, since it's an internal page). I'm not entirely sure if Mozilla took the situation into account where a user constantly starts and stops the browser with no network traffic, but it's possible (haven't checked the code) that if the browser is shut down and there's an error talking to the cache during shutdown, that the cache is considered "corrupted" and to be on the safe side is marked as "doomed" and will be trashed next session. If you keep repeating the procedure without giving it a chance to initialize (at which point it would clean up the doomed cache entries) then the trash dirs might indeed accumulate.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Pyrynd

Re: 28.17.0 - New/fresh profiles cache issue

Unread post by Pyrynd » 2020-12-23, 13:42

Thank You for the explanation. Once I found out that it does show eventually, I figured it must be some kind of lazy load scenario.

At the time when I started this thread I was geniuenly convinced that the cache does not show up at all.
I probably wouldn't raise this issue if I had this key piece of information.

I guess a little patience makes a great deal of difference, huh? :oops:


If You don't mind me asking, I wonder why profiles carrried over form previous verisons behave differently than fresh ones?
On several of my older profiles (run on 28.17) the cache shows up immidiately - this behavior is very much repeatable.
If I deleted the entire cache folder of said profile (appdata/local/...), then it will behave like a fresh one.

This difference in behavior led me to believe there might be a problem. :think:

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35473
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: 28.17.0 - New/fresh profiles cache issue

Unread post by Moonchild » 2020-12-23, 14:09

Your old profiles likely do not have the same browser settings.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked