git-svn: memoize _rev_list and rebuild
git-svn: memoize _rev_list and rebuild

According to profile data, _rev_list and rebuild consume a large
portion of time.  Memoize the results of _rev_list and memoize
rebuild internals to avoid subprocess invocation.

When importing 15152 revisions on a LAN, time improved from 10
hours to 3-4 hours.

Signed-off-by: lin zuojian <be745389a175a92ec4e16c468423ff64892bbb8f@gmail.com>
Signed-off-by: Eric Wong <8c2951295f8292b0c03727bc4652981172298eae@yhbt.net>

destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git