Opened 5 years ago

Closed 5 years ago

Last modified 13 months ago

#15145 closed bug (no change required)

[Installer] should ignore cache directory

Reported by: diver Owned by: nobody
Priority: critical Milestone:
Component: Applications/Installer Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #15417, #15477
Platform: All

Description (last modified by diver)

At least HaikuDepot stores a few thousands icons in cache directory. Cloning already installed haiku to another partition becomes really slow in this case.

https://xref.plausible.coop/source/xref/haiku/src/apps/installer/WorkerThread.cpp#95

Change History (16)

comment:1 by waddlesplash, 5 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev53252.

comment:2 by diver, 5 years ago

This fix actually caused problems. Since cache isn't copied anymore it is not present for case when you use Installer to copy existing installation to another partition.

Then all apps that need cache folder will fail. For example HaikuDepot will complain.

To workaround it one can do this:

unmount ~/config
mkdir ~/config/cache

comment:3 by waddlesplash, 5 years ago

Resolution: fixed
Status: closedreopened

comment:4 by waddlesplash, 5 years ago

Priority: normalblocker

comment:5 by pulkomandy, 5 years ago

Why do we want to ignore it in the first place? It's not /tmp, the cache is surely meant to be somewhat persistant. If an app is storing too much data there, we should rather fix that?

Please always include a description in tickets, that would help :)

comment:6 by diver, 5 years ago

Description: modified (diff)

comment:7 by diver, 5 years ago

Blocking: 15417 added

comment:8 by pulkomandy, 5 years ago

Blocking: 15477 added

comment:9 by pulkomandy, 5 years ago

Change reverted in hrev53578, we need something that doesn't break the resulting install.

comment:10 by kallisti5, 5 years ago

Priority: blockercritical

Removing blocker status since it was reverted. This one is still an issue but doesn't appear to be a R1 Beta2 blocker

comment:11 by CodeforEvolution, 5 years ago

I think I have a solution for this! I’m quite certain that the find_directory function has a parameter that allows one to have a folder created if it doesn’t already exist. This would mean that cache using applications could utilize this feature of find_directory and the cache folder can simply be ignored again by the Installer.

comment:12 by pulkomandy, 5 years ago

We cannot be sure that all applications use this api. Infactwe know some don't, and this iswhy this was done and then reverted. I think we should rather fix haikudepot to not download thousands of icon files when you run it and let Installer do it's job normally.

comment:13 by leavengood, 5 years ago

I started working on a fix to Installer which just creates the needed directories on the installed-to volume after files have been copied. I believe there were some other ones I wanted to create too. I could try to restore my work on that and finish it up. I forget what held it up, but I was working on it last summer.

But I agree about the huge icon cache. Why can't HaikuDepot render icons directly from the packages?

comment:14 by pulkomandy, 5 years ago

Because it does this for packages which are not downloaded/installed.

But it could still store them more efficiwntly, for example as a single file with many icon attributes or resources. That would solve the issue without needing any special-casing in Installer

comment:15 by pulkomandy, 5 years ago

Resolution: no change required
Status: reopenedclosed

Should be fixed in HaikuDepot side instead, see #15370.

comment:16 by nielx, 5 years ago

Milestone: R1/beta2

Remove milestone for tickets with status = closed and resolution != fixed

Note: See TracTickets for help on using tickets.