From: "Jon Smirl" <jonsmirl@gmail.com>
To: "Keith Packard" <keithp@keithp.com>, git <git@vger.kernel.org>
Subject: parsecvs leaks and optimizations
Date: Sun, 18 Jun 2006 01:15:10 -0400 [thread overview]
Message-ID: <9e4733910606172215t2d1e987g207d1d394a6f92b@mail.gmail.com> (raw)
#1) the seen field is wrapping, char is too small.
#2)
static void
rev_tag_search (rev_ref **tags, int ntag, rev_ref *tag, rev_list *rl)
{
rev_commit **commits = calloc (ntag, sizeof (rev_commit *));
int n;
for (n = 0; n < ntag; n++)
commits[n] = tags[n]->commit;
ntag = rev_commit_date_sort (commits, ntag);
tag->parent = rev_branch_of_commit (rl, commits[0]);
if (tag->parent)
tag->commit = rev_commit_locate (tag->parent, commits[0]);
if (!tag->commit) {
tag->commit = rev_commit_build (commits, ntag);
>>> everything from here is leaking
}
free (commits);
}
#3) cvs_find_symbol is very hot, probably should be a hash. Mozilla
has thousands of symbols.
#4) rcs2git is n-squared and parses the file over and over to get the
revs. The n-squared really hurts when a ,v file is 45MB. A single pass
algorithm would work wonders. Or at least cache the offsets to the
revs as they are found. Can the revs be written straight to a pack
file and then connected up with a tree later?
#5) This small group fails, parsecvs sends a null to git. Git dies.
/home/mozcvs/mozilla/Makefile.in,v
/home/mozcvs/mozilla/.cvsignore,v
/home/mozcvs/mozilla/LEGAL,v
/home/mozcvs/mozilla/LICENSE,v
/home/mozcvs/mozilla/README.txt,v
/home/mozcvs/mozilla/aclocal.m4,v
/home/mozcvs/mozilla/camino.mk,v
#6) comparing versions is very hot. Could versions be encoded into a
long or long long for more efficient comparisons? Packed bit field
unioned with long. Checks on initial parsing to make sure fields don't
over flow.
I'm working on some global analysis to try and track down the missing
branch tags but it is very slow going. It would be better to speed up
the basic process first.
--
Jon Smirl
jonsmirl@gmail.com
reply other threads:[~2006-06-18 5:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9e4733910606172215t2d1e987g207d1d394a6f92b@mail.gmail.com \
--to=jonsmirl@gmail.com \
--cc=git@vger.kernel.org \
--cc=keithp@keithp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).