[haiku-bugs] Re: [Haiku] #16787: Bibliotheken Handhabung
- From: "Haiku" <trac@xxxxxxxxxxxx>
- To: undisclosed-recipients: ;
- Date: Fri, 05 Feb 2021 11:37:10 -0000
#16787: Bibliotheken Handhabung
--------------------------+---------------------------------
Reporter: lelldorin | Owner: nobody
Type: enhancement | Status: new
Priority: normal | Milestone: Unscheduled
Component: - General | Version: R1/beta2
Resolution: | Keywords: Libraried, handling
Blocked By: | Blocking:
Platform: All |
--------------------------+---------------------------------
Comment (by X512):
But on the other hand you will have a thousand copies of the Haiku
package files in different places.
That are not copies, but dynamically generated items. It almost don't cost
anything.
I don't understand how "read on demand" would work.
When some application will invoke read directory or open file syscall,
`package_fs` will return generated symlinks in addition to actually stored
package data. Something like this (pseudocode):
{{{
#!c++
struct {
// generate dependency symlinks based on HPKG header
IteratorIterator* dynIt;
// read actual compressed files and directories
HpkgIterator* baseIt;
} Iterator;
status_t MergeIterators(Iterator* it1, Iterator* it2, struct stat &stat)
{
// algorithm of in-place merging of 2 sorted sequences
}
status_t ReadDir(void *cookie, struct stat &stat)
{
Iterator *it = (Iterator*)cookie;
return MergeIterators(it->dynIt, it->baseIt, stat);
}
}}}
Maybe for access by path, but Deskbar will access all your apps to get
their icons, so already all your app packages are mounted when you open
the deskbar menu.
It will not require traversing and storing all package files in RAM like
in current merge-based `package_fs`. Only needed packages that have
Deskbar menu entry will be read.
And if you do a query in packagefs (for example if you use the "open
with" menu), you need to load everything in the filesystem anyway.
Not everything, but only index of required attribute.
Also it will cause other problems, searching for a file (foo.so) using
Tracker find will return thousands of results in all places where that lib
is used.
Some option for skipping auto-generated symlinks can be provided. That
symlinks do not even need to be indexed.
--
Ticket URL: <
https://dev.haiku-os.org/ticket/16787#comment:14>
Haiku <
https://dev.haiku-os.org>
The Haiku operating system.
Other related posts: