Re: [PATCH 2/4] pack v4: add v4_size to struct delta_base_cache_entry

2013-09-15 Thread Duy Nguyen
On Mon, Sep 16, 2013 at 11:42 AM, Nicolas Pitre wrote: > On Sun, 15 Sep 2013, Duy Nguyen wrote: > >> On Sat, Sep 14, 2013 at 11:22 AM, Nicolas Pitre wrote: >> > The cache is currently updated by the caller. The caller may ask for a >> > copy of 2 entries from a base object, but that base object

Re: [PATCH 2/4] pack v4: add v4_size to struct delta_base_cache_entry

2013-09-15 Thread Nicolas Pitre
On Sun, 15 Sep 2013, Duy Nguyen wrote: > On Sat, Sep 14, 2013 at 11:22 AM, Nicolas Pitre wrote: > > The cache is currently updated by the caller. The caller may ask for a > > copy of 2 entries from a base object, but that base object may itself > > copy those objects from somewhere else in a lar

Re: [PATCH 2/4] pack v4: add v4_size to struct delta_base_cache_entry

2013-09-15 Thread Duy Nguyen
On Sat, Sep 14, 2013 at 11:22 AM, Nicolas Pitre wrote: > The cache is currently updated by the caller. The caller may ask for a > copy of 2 entries from a base object, but that base object may itself > copy those objects from somewhere else in a larger chunk. > > Let's consider this example: > >

Re: [PATCH 2/4] pack v4: add v4_size to struct delta_base_cache_entry

2013-09-13 Thread Nicolas Pitre
On Fri, 13 Sep 2013, Nicolas Pitre wrote: > On Fri, 13 Sep 2013, Duy Nguyen wrote: > > > On Fri, Sep 13, 2013 at 8:27 PM, Nicolas Pitre wrote: > > > However I can see that, as you say, the same base object is repeatedly > > > referenced. This means that we need to parse it over and over again >

Re: [PATCH 2/4] pack v4: add v4_size to struct delta_base_cache_entry

2013-09-13 Thread Nicolas Pitre
On Fri, 13 Sep 2013, Duy Nguyen wrote: > On Fri, Sep 13, 2013 at 8:27 PM, Nicolas Pitre wrote: > > On Thu, 12 Sep 2013, Nguyễn Thái Ngọc Duy wrote: > > > >> The intention is to store flat v4 trees in delta base cache to avoid > >> repeatedly expanding copy sequences in v4 trees. When the user nee

Re: [PATCH 2/4] pack v4: add v4_size to struct delta_base_cache_entry

2013-09-13 Thread Duy Nguyen
On Fri, Sep 13, 2013 at 8:27 PM, Nicolas Pitre wrote: > On Thu, 12 Sep 2013, Nguyễn Thái Ngọc Duy wrote: > >> The intention is to store flat v4 trees in delta base cache to avoid >> repeatedly expanding copy sequences in v4 trees. When the user needs >> to unpack a v4 tree and the tree is found in

Re: [PATCH 2/4] pack v4: add v4_size to struct delta_base_cache_entry

2013-09-13 Thread Nicolas Pitre
On Thu, 12 Sep 2013, Nguyễn Thái Ngọc Duy wrote: > The intention is to store flat v4 trees in delta base cache to avoid > repeatedly expanding copy sequences in v4 trees. When the user needs > to unpack a v4 tree and the tree is found in the cache, the tree will > be converted back to canonical fo