added a cache to the datablock optimizer so it wouldn't need to read the entire datablock to find its optimizations
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3667 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
15e6286454
commit
f4089b9d60
2 changed files with 26 additions and 15 deletions
|
@ -198,7 +198,7 @@ class CEXEBuild {
|
|||
#endif //NSIS_CONFIG_PLUGIN_SUPPORT
|
||||
|
||||
// build.cpp functions used mostly within build.cpp
|
||||
int datablock_optimize(int start_offset);
|
||||
int datablock_optimize(int start_offset, int first_int);
|
||||
void printline(int l);
|
||||
int process_jump(LineParser &line, int wt, int *offs);
|
||||
|
||||
|
@ -328,8 +328,16 @@ class CEXEBuild {
|
|||
TinyGrowBuf build_pages, ubuild_pages, *cur_pages;
|
||||
TinyGrowBuf build_ctlcolors, ubuild_ctlcolors, *cur_ctlcolors;
|
||||
|
||||
// don't forget to update the cache after updating the datablock
|
||||
// see datablock_optimize for an example
|
||||
MMapBuf build_datablock, ubuild_datablock;
|
||||
IGrowBuf *cur_datablock;
|
||||
TinyGrowBuf build_datablock_cache, ubuild_datablock_cache;
|
||||
IGrowBuf *cur_datablock, *cur_datablock_cache;
|
||||
struct cached_db_size
|
||||
{
|
||||
int first_int; // size | (compressed ? 0x80000000 : 0)
|
||||
int start_offset;
|
||||
};
|
||||
|
||||
int build_filebuflen;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue