Speed up trace mode (GSoC Project)
Clemens Lang
cal at macports.org
Mon Apr 22 13:40:20 UTC 2019
Hi,
On Sun, Apr 21, 2019 at 11:01:09PM +0530, Mihir Luthra wrote:
> This is almost the same way as in the arXiv paper you shared with me.
> As we are dealing with paths, I saw implementing the above hash
> function would make the search faster as this happens quite a few
> times that files with same name have same path length from the root.
> So to get information about a file “abc.txt”, we just need to get the
> length of the path to this file from the root. Suppose the length of
> string of path from root is 16. Then the hash function takes the input
> “abc.txt” and makes it “16-abc.txt”. Now in the tree, the first level
> categorises it as per the path length, which just leaves the need to
> check the file name and in the worst case where files with same name
> have same length of path from the root, they are chained at the end of
> the tree.
Sounds like it's a good approach then.
> Although I haven’t tested the time complexities yet but even if this
> structure is not to be implemented, it won’t make much difference
> because all we would need is to put the hash function and simply
> search for the complete length instead of complete path which seems to
> be a quite easy replacement.
> I would stick with the basic structure which is less complex and
> tested and will only try to switch and test the this when all other
> things are done, that maybe a good idea.
What's your current progress? Do you have some code already?
--
Clemens
More information about the macports-dev
mailing list