<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git, branch cmn/pack-unpack-loop</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/'/>
<entry>
<title>pack: don't forget to cache the base object</title>
<updated>2014-05-13T00:48:52+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-05-12T00:01:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=c968ce2c2c49ca7a559ecb8f7014f777c3a8a5f3'/>
<id>c968ce2c2c49ca7a559ecb8f7014f777c3a8a5f3</id>
<content type='text'>
The base object is a good cache candidate, so we shouldn't forget to add
it to the cache.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The base object is a good cache candidate, so we shouldn't forget to add
it to the cache.
</pre>
</div>
</content>
</entry>
<entry>
<title>pack: use stack allocation for smaller delta chains</title>
<updated>2014-05-13T00:48:52+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-05-11T03:31:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=15bcced22379857978d80539da5fdd8f4667ff95'/>
<id>15bcced22379857978d80539da5fdd8f4667ff95</id>
<content type='text'>
This avoid allocating the array on the heap for relatively small
chains. The expected performance increase is sadly not really
noticeable.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This avoid allocating the array on the heap for relatively small
chains. The expected performance increase is sadly not really
noticeable.
</pre>
</div>
</content>
</entry>
<entry>
<title>pack: expose a cached delta base directly</title>
<updated>2014-05-13T00:48:48+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-05-11T01:50:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=a3ffbf230e454309c96961a182520a53f555d356'/>
<id>a3ffbf230e454309c96961a182520a53f555d356</id>
<content type='text'>
Instead of going through a special entry in the chain, let's pass it as
an output parameter.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of going through a special entry in the chain, let's pass it as
an output parameter.
</pre>
</div>
</content>
</entry>
<entry>
<title>pack: simplify delta chain code</title>
<updated>2014-05-09T07:59:24+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-05-09T07:36:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=9dbd150f5f499bbf768d65c4ebb596651e77a1b8'/>
<id>9dbd150f5f499bbf768d65c4ebb596651e77a1b8</id>
<content type='text'>
The switch makes the loop somewhat unwieldy. Let's assume it's fine and
perform the check when we're accessing the data.

This makes our code look a lot more like git's.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The switch makes the loop somewhat unwieldy. Let's assume it's fine and
perform the check when we're accessing the data.

This makes our code look a lot more like git's.
</pre>
</div>
</content>
</entry>
<entry>
<title>pack: preallocate a 64-element chain</title>
<updated>2014-05-09T07:40:29+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-05-08T15:14:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=b2559f477a3f8e2bc76140ca2c76d8cc30b5f5da'/>
<id>b2559f477a3f8e2bc76140ca2c76d8cc30b5f5da</id>
<content type='text'>
Dependency chains are often large and require a few
reallocations. Allocate a 64-element chain before doing anything else to
avoid allocations during the loop.

This value comes from the stack-allocated one git uses. We still
allocate this on the heap, but it does help performance a little bit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Dependency chains are often large and require a few
reallocations. Allocate a 64-element chain before doing anything else to
avoid allocations during the loop.

This value comes from the stack-allocated one git uses. We still
allocate this on the heap, but it does help performance a little bit.
</pre>
</div>
</content>
</entry>
<entry>
<title>pack: make sure not to leak the dep chain</title>
<updated>2014-05-09T07:40:29+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-05-08T14:24:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=e6d10c58b547181fe19f6bacff6bd0dee9f67b9b'/>
<id>e6d10c58b547181fe19f6bacff6bd0dee9f67b9b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>pack: use a cache for delta bases when unpacking</title>
<updated>2014-05-09T07:40:29+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-05-06T21:37:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=a332e91c92524cc21818eadfbe723361d31dc187'/>
<id>a332e91c92524cc21818eadfbe723361d31dc187</id>
<content type='text'>
Bring back the use of the delta base cache for unpacking objects. When
generating the delta chain, we stop when we find a delta base in the
pack's cache and use that as the starting point.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bring back the use of the delta base cache for unpacking objects. When
generating the delta chain, we stop when we find a delta base in the
pack's cache and use that as the starting point.
</pre>
</div>
</content>
</entry>
<entry>
<title>pack: unpack using a loop</title>
<updated>2014-05-09T07:40:29+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-05-06T17:20:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=2acdf4b854bf55ba2630c7342d09b136d919d6ad'/>
<id>2acdf4b854bf55ba2630c7342d09b136d919d6ad</id>
<content type='text'>
We currently make use of recursive function calls to unpack an object,
resolving the deltas as we come back down the chain. This means that we
have unbounded stack growth as we look up objects in a pack.

This is now done in two steps: first we figure out what the dependency
chain is by looking up the delta bases until we reach a non-delta
object, pushing the information we need onto a stack and then we pop
from that stack and apply the deltas until there are no more left.

This version of the code does not make use of the delta base cache so it
is slower than what's in the mainline. A later commit will reintroduce
it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We currently make use of recursive function calls to unpack an object,
resolving the deltas as we come back down the chain. This means that we
have unbounded stack growth as we look up objects in a pack.

This is now done in two steps: first we figure out what the dependency
chain is by looking up the delta bases until we reach a non-delta
object, pushing the information we need onto a stack and then we pop
from that stack and apply the deltas until there are no more left.

This version of the code does not make use of the delta base cache so it
is slower than what's in the mainline. A later commit will reintroduce
it.
</pre>
</div>
</content>
</entry>
<entry>
<title>pack: do not repeat the same error message four times</title>
<updated>2014-05-09T07:40:29+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-05-06T19:21:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=ae0817393c0aaff5c4b085c46ed11acc0ab64198'/>
<id>ae0817393c0aaff5c4b085c46ed11acc0ab64198</id>
<content type='text'>
Repeating this error message makes it harder to find out where we
actually are finding the error, and they don't really describe what
we're trying to do.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Repeating this error message makes it harder to find out where we
actually are finding the error, and they don't really describe what
we're trying to do.
</pre>
</div>
</content>
</entry>
<entry>
<title>pack: remove misleading comment</title>
<updated>2014-05-09T07:40:29+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-05-06T14:20:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=86d5810b82965224b1270c3627da029588935abb'/>
<id>86d5810b82965224b1270c3627da029588935abb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
