Speed up trace mode (GSoC Project)
Clemens Lang
cal at macports.org
Sat Apr 20 17:52:22 UTC 2019
Hi Mihir,
On Tue, Apr 16, 2019 at 11:59:53PM +0530, Mihir Luthra wrote:
> Kindly provide your suggestions for this.
> In the path search Ctrie data structure, I categorised the paths with
> the hash function working like:
>
> If I input a path /test/files/abc.h for check
> Here we have open to abc.h, the hash function simply makes it
> “12:abc.h" where 12 is the length of path "/test/files/" to abc.h
> The first level of the categorises the paths by the length of their
> real path.
> After this the search is made as per the file name i.e. abc.h and at
> the final node key-value pair(s) are matched.
>
> 1st level being categorised by real path length to the file reduces
> the search time is most cases.
> After that character by character, file name is checked.
> Two files with same name having same length of path from the root
> seems rare, but if any two have the same, chaining is done(which seems
> to be appropriate here because of less number of such cases).
>
> https://drive.google.com/file/d/16HCVUpljPSz1Wn4UEx_gYQ3qDg3JyfH_/view?usp=sharing
Did you design this yourself, or did you come across a paper that
suggests doing it this way? In general, I think most times, it's wise to
rely on published research in such occasions, because peer-reviewed
papers will usually have done comparison measurements.
--
Clemens
More information about the macports-dev
mailing list