Re: [PATCH v3 2/4] path: optimize common dir checking
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Aug 15, 2015, 07:59 UTC
- Message-ID
- <CACsJy8BCr7StbtcrgsbTiosTX1RkjwwWyRqddz2XDhFn5R+zAw@mail.gmail.com>
- In-Reply-To
- <1439416645-19173-2-git-send-email-dturner@twopensource.com>
On Thu, Aug 13, 2015 at 4:57 AM, David Turner <dturner@twopensource.com> wrote:
> Instead of a linear search over common_list to check whether > a path is common, use a trie. The trie search operates on > path prefixes, and handles excludes.
Just be careful that the given key from git_path is not normalized. I think you assume it is in the code, but I haven't read carefully. We could of course optimize for the good case: assume normalized and search, then fall back to explicit normalizing and search again.
-- Duy