Speed up trace mode

Mihir Luthra 1999mihir.luthra at gmail.com
Sun Jun 2 07:45:45 UTC 2019


Hi,

I have implemented the points that we discussed till now in macports-base.
You can find the updated macports-base in my forked repository.

https://github.com/MihirLuthra/macports-base

I also have made many modifications to library to optimise it for use in
base. I haven’t updated in the readme or comments about those so I made a
separate repo for the time being.
Here is the new code:
https://github.com/MihirLuthra/sm_mp

Currently I am deleting the shared memory file after every phase and
creating new.
 I am not sure on this but I think it should be ok to share same shared
file among all phases of a single port because it looks like every next
phase just expands the existing sandbox. Although I am not sure about this.

Also, I am just storing data for paths containing ascii char 32 to 128.
Storing in a utf-8 fashion would just double the time taken by library in
insertion and paths rarely contain characters outside range 32-128.
Although its easy to change anytime if needed.
I am taking 50MB as initial file size and generally ports don’t take above
this and if they do memory will expand.

It would be great if you can test with 1 or 2 ports and tell me if the
speed improvements you were looking for are achieved or not.
I tested on few ports and it seems to be working okayish. Probably some
more improvements would make it better.
Along with dependencies I tried installing gettext, glib2, db48.

Like when installing gettext(along with dependencies nurses, libiconv and
gperf) it takes 11 - 11:30 mins with library and without library it takes
around 11:30-12:30. I don’t know how to make the analysis of speed
improvements in correct way, so I have just used the `time` command.
Although I belief I still need to do some changes which may reduce time
taken to some more extent and probably would be much better after I have
your suggestions regarding the code.

Also when source installing openssl port, i need to install perl5.28 by
myself otherwise it crashes using perl5.18(says no such file or dir). That
maybe my machine specific problem or maybe problem caused by my code.
Although all other ports I tested worked fine.

Regards,
Mihir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20190602/0bf8cad0/attachment.html>


More information about the macports-dev mailing list