diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-12-01 03:23:25 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-12-01 03:23:25 +0000 |
commit | 3a03e4be1a744d37c66ea97651ca082ee4eb39d4 (patch) | |
tree | 1413ab7738e519a88c4fe7cd9910f02a2339cbd1 /src/stylesheet.c | |
parent | db917066e504364749a21a43b2fd8193db0322e8 (diff) | |
download | libcss-3a03e4be1a744d37c66ea97651ca082ee4eb39d4.tar.gz libcss-3a03e4be1a744d37c66ea97651ca082ee4eb39d4.tar.bz2 |
Divorce css_string from whatever gets stored in lpu hashes.
Use pointers to parserutils_hash_entry directly in stylesheet datastructures.
The upshot of this for allzengarden.css is:
5506 slots used (of 8192 => 67.211914%)
Data:
8 full blocks: 32768 bytes
9 partial blocks: 35124 bytes (of 36864 => 95.279945%)
Total: 69936 (4112) (32)
Hash structures: 65584
i.e. a total string dictionary size of 135,520 bytes, which is some 74,056 bytes less than before.
svn path=/trunk/libcss/; revision=5859
Diffstat (limited to 'src/stylesheet.c')
-rw-r--r-- | src/stylesheet.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/stylesheet.c b/src/stylesheet.c index b2e1c0e..f700a63 100644 --- a/src/stylesheet.c +++ b/src/stylesheet.c @@ -357,7 +357,7 @@ css_error css_stylesheet_selector_create(css_stylesheet *sheet, css_selector_type type, const css_string *name, const css_string *value, css_selector **selector) { - const css_string *iname, *ivalue; + const parserutils_hash_entry *iname, *ivalue; css_selector *sel; parserutils_error perror; @@ -440,7 +440,7 @@ css_error css_stylesheet_selector_detail_create(css_stylesheet *sheet, const css_string *value, css_selector_detail **detail) { parserutils_error perror; - const css_string *iname, *ivalue; + const parserutils_hash_entry *iname, *ivalue; css_selector_detail *det; if (sheet == NULL || name == NULL || detail == NULL) @@ -808,7 +808,8 @@ static void css_stylesheet_dump_selector(css_selector *selector, FILE *target, size_t *size); static void css_stylesheet_dump_selector_detail(css_selector_detail *detail, FILE *target, size_t *size); -static void css_stylesheet_dump_string(const css_string *string, FILE *target); +static void css_stylesheet_dump_string(const parserutils_hash_entry *string, + FILE *target); /** * Dump a stylesheet @@ -1025,7 +1026,8 @@ void css_stylesheet_dump_selector_detail(css_selector_detail *detail, * \param string The string to dump * \param target The file handle to output to */ -void css_stylesheet_dump_string(const css_string *string, FILE *target) +void css_stylesheet_dump_string(const parserutils_hash_entry *string, + FILE *target) { fprintf(target, "%.*s", (int) string->len, string->data); } |