diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-11-30 16:43:37 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-11-30 16:43:37 +0000 |
commit | 79a34e5d5a9a93d9232efd595291bc5ebea2f2c5 (patch) | |
tree | c35e7cc49699420e01a973f4bccb639931e9cc1d /src/parse/parse.h | |
parent | 7dad1d392d1c380648f6de13f81ade48ce958be1 (diff) | |
download | libcss-79a34e5d5a9a93d9232efd595291bc5ebea2f2c5.tar.gz libcss-79a34e5d5a9a93d9232efd595291bc5ebea2f2c5.tar.bz2 |
Use parserutils_hash instead of parserutils_dict.
This approximately halves the size of the interned string table.
We now have the following for allzengarden.css:
5507 slots used (of 8192 => 67.224121%)
Data:
3 full blocks: 12288 bytes
10 partial blocks: 38946 bytes (of 40960 => 95.083008%)
Total: 53488 (4112) (32)
Entries:
21 full blocks: 86016 bytes
1 partial blocks: 2096 bytes (of 4096 => 51.171875%)
Total: 90496 (4112) (32)
Hash structures: 65592
Which gives a total dictionary size of 209,576 bytes.
Note that 43% of this is parserutils_hash_entry structures (length-pointer pairs). It would be good, therefore, to be able to purge these.
svn path=/trunk/libcss/; revision=5852
Diffstat (limited to 'src/parse/parse.h')
-rw-r--r-- | src/parse/parse.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parse/parse.h b/src/parse/parse.h index a948d56..7e57791 100644 --- a/src/parse/parse.h +++ b/src/parse/parse.h @@ -8,7 +8,7 @@ #ifndef css_parse_parse_h_ #define css_parse_parse_h_ -#include <parserutils/utils/dict.h> +#include <parserutils/utils/hash.h> #include <parserutils/utils/vector.h> #include <libcss/errors.h> @@ -57,7 +57,7 @@ typedef union css_parser_optparams { } css_parser_optparams; css_error css_parser_create(const char *charset, css_charset_source cs_source, - parserutils_dict *dict, css_alloc alloc, void *pw, + parserutils_hash *dict, css_alloc alloc, void *pw, css_parser **parser); css_error css_parser_destroy(css_parser *parser); |