Age | Commit message (Collapse) | Author |
|
|
|
|
|
For a long time it had a custom ADT with a list of nodes and each
node a linked list (with pointers). The last memory bug motivated me to
try to normalize it to use dlib. Now, it got simpler, shorter, and
possibly faster (although conversion wasn't a simple task).
PD: It also uses less memory now.
|
|
This allows keeping the decompressed image entry until a_Dicache_cleanup()
removes it. With the added SurvCleanup variable that controls how many
cleanup passes the entry is kept, it is now possible to tune the dicache.
For instance:
SurvCleanup=0 same as without patch (negligible difference).
SurvCleanup=1 allows Back and Forward reuse entries for adjacent pages.
SurvCleanup=2 all the above, plus one more pass of lifetime.
The default is SurvCleanup=3 (experimental).
Example: If you read a newspaper with lots of images, this caching allows
to click an article, read it, and go back *quickly* using the same tab.
It is experimental because there may be other simple approaches that serve
well/better these kind of usage patterns.
|
|
This allows reuse of the dicache entry after repush changes DilloImage.
|
|
Currently I see no way to hit the condition, but better safe than sorry.
|
|
Useful to avoid "false positives" with valgrind.
|
|
Invalid read of size 8
at 0x426066: a_Dicache_cleanup (dicache.c:557)
by 0x42421C: Cache_process_queue (cache.c:1261)
by 0x42424B: Cache_delayed_process_queue_callback (cache.c:1278)
Address 0x83ea120 is 96 bytes inside a block of size 104 free'd
at 0x4C2870C: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x44CC43: dFree (dlib.c:68)
by 0x42552D: Dicache_remove (dicache.c:207)
Simple way to reproduce it:
Load an html page with a single image, isolate image in new tab, reload
the raw image, close html tab, go for bookmarks, exit.
|
|
Using the same testing files as the previous patch,
the results are:
.---------------------------------------------.
|imgbufs | No patch | Patch #1 | Patch #2 |
|----------------------------------------------
|1imgA.html | 2/1 | 1/1 | 1/0 |
|2imgSA.html | 3/2 | 1/2 | 1/0 |
|3imgSA.html | 4/3 | 1/3 | 1/0 |
|----------------------------------------------
|2imgA.html | 4/2 | 2/2 | 2/0 |
|3imgA.html | 6/3 | 3/3 | 3/0 |
'---------------------------------------------'
n1/n2 means:
n1 imgbufs were created for first load (empty cache)
n2 imgbufs were created for reload (cached image)
Notes:
* Rendering is much faster. Easy to notice with Back operation.
* Between four to five times on www.welt.de.
* Corner cases can be more than ten times. Usually, it *feels* faster.
|
|
This is the first of a patch series for image code bugs that have
severe impact on performance.
With these testing files:
1imgA.html = <img src="maj00s.png" alt="img1">
2imgSA.html = <img src="maj00s.png" alt="img1">
<img src="maj00s.png" alt="img12">
3imgSA.html = <img src="maj00s.png" alt="img1">
<img src="maj00s.png" alt="img12">
<img src="maj00s.png" alt="img123">
2imgA.html = <img src="maj00s.png" alt="img1">
<img src="maj21s.png" alt="img12">
3imgA.html = <img src="maj00s.png" alt="img1">
<img src="maj21s.png" alt="img12">
<img src="c10s.png" alt="img123">
This are the results:
.------------------------------------------------------------------.
|imgbufs | No patch | Patched #1 |
| | first time | upon reload | first time | upon reload |
|-------------------------------------------------------------------
|1imgA.html | 2 | 1 | 1 | 1 |
|2imgSA.html | 3 | 2 | 1 | 2 |
|3imgSA.html | 4 | 3 | 1 | 3 |
|-------------------------------------------------------------------
|2imgA.html | 4 | 2 | 2 | 2 |
|3imgA.html | 6 | 3 | 3 | 3 |
'------------------------------------------------------------------'
|
|
|
|
at once.
|
|
dw::core::ImgRenderer, not dw::Image (which now implements the former) anymore.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
To set a custom background color add a line like:
body {background-color: white}
to your ~/.dillo/style.css file.
This also works for plain text display and image viewing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The optimization was causing crashes.
|
|
|
|
1.- Every repeated cache-served-image is decoded. The patch adds
an extra reference to the dicache entry, so only one of them is
decoded, and the imgbuf deletion is left to a_Dicache_cleanup.
2.- Every repeated cache-served-image call copyRow for each row.
The patch avoids that.
This is common with small images (e.g. bullets), but the
overhead may be not worth the patch...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Fixed progressive display of interlaced pngs.
|
|
|
|
|