[tor-bugs] #33283 [Applications/rbm]: Add caching for the exec function in rbm
Tor Bug Tracker & Wiki
blackhole at torproject.org
Wed Feb 12 10:14:57 UTC 2020
#33283: Add caching for the exec function in rbm
----------------------------------+---------------------
Reporter: boklm | Owner: boklm
Type: task | Status: new
Priority: Medium | Milestone:
Component: Applications/rbm | Version:
Severity: Normal | Keywords: tbb-rbm
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
----------------------------------+---------------------
In a mail to tbb-dev, dcf mentioned that while building tor-browser, a lot
of time is spent in rbm:
https://lists.torproject.org/pipermail/tbb-dev/2020-February/001045.html
I think an easy way to improve this is by caching the result from the
`exec()` template function. We use it for example with the line `version:
'[% c("abbrev") %]'` which runs something like `exec("git log -1
--format=%h")`, which then runs a `git checkout` before running the `git
log` command. The `version` value is used in filenames, and build_id,
which are then used in a lot of places, but with no caching we end up
doing a lot of calls the same `git checkout` and `git log` commands. The
switch to `pion` which added a lot of go projects each with their git
repository probably made this issue more visible.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/33283>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list