Mercurial > hg4j
comparison design.txt @ 198:33a7d76f067b
Performance optimization: reduce memory to keep revlog cached info
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Wed, 20 Apr 2011 05:40:14 +0200 |
| parents | 3a7696fb457c |
| children | 114c9fe7b643 |
comparison
equal
deleted
inserted
replaced
| 197:3a7696fb457c | 198:33a7d76f067b |
|---|---|
| 97 after pooling/caching in HgStatusCollector and HgChangeset | 97 after pooling/caching in HgStatusCollector and HgChangeset |
| 98 hg log --debug -r 0:5000 and same via Log/HgLogCommand: approx. 220 seconds vs 279 seconds. Mem. cons. 20 vs 80 mb. | 98 hg log --debug -r 0:5000 and same via Log/HgLogCommand: approx. 220 seconds vs 279 seconds. Mem. cons. 20 vs 80 mb. |
| 99 after further changes in HgStatusCollector (to read ahead 5 elements, 50 max cache, fixed bug with -1) - hg4j dumps 5000 in | 99 after further changes in HgStatusCollector (to read ahead 5 elements, 50 max cache, fixed bug with -1) - hg4j dumps 5000 in |
| 100 93 seconds, memory consumption about 50-56 Mb | 100 93 seconds, memory consumption about 50-56 Mb |
| 101 | 101 |
| 102 IndexEntry(int offset, int baseRevision) got replaced with int[] arrays (offsets - optional) | |
| 103 for 69338 revisions from cpython repo 1109408 bytes reduced to 277368 bytes with the new int[] version. | |
| 104 I.e. total for changelog+manifest is 1,5 Mb+ gain | |
| 105 | |
| 102 <<<<< | 106 <<<<< |
| 103 | 107 |
| 104 Tests: | 108 Tests: |
| 105 DataAccess - readBytes(length > memBufferSize, length*2 > memBufferSize) - to check impl is capable to read huge chunks of data, regardless of own buffer size | 109 DataAccess - readBytes(length > memBufferSize, length*2 > memBufferSize) - to check impl is capable to read huge chunks of data, regardless of own buffer size |
| 106 | 110 |
