Commit Graph

136 Commits

Author SHA1 Message Date
Vincent Sanders
73e45ff024 Fix error reporting from fetch_start
Any fetch start error was being reported as "out of memory" which was
clearly insufficient. Foe example bad urls (reported was file:// with
a missing /) were causing a warn_user with out of memory. This change
now at least causes a "bad url" message.
2015-06-24 10:31:13 +01:00
Vincent Sanders
0d811963c1 fixup all the remaining logging macro callsites
The semantic patch tool appears to have missed some difficult to
reason about callsites which have now been manually cleaned up
2015-05-28 17:06:18 +01:00
Vincent Sanders
c105738fa3 Change LOG() macro to be varadic
This changes the LOG macro to be varadic removing the need for all
callsites to have double bracketing and allows for future improvement
on how we use the logging macros.

The callsites were changed with coccinelle and the changes checked by
hand. Compile tested for several frontends but not all.

A formatting annotation has also been added which allows the compiler
to check the parameters and types passed to the logging.
2015-05-28 16:08:46 +01:00
Michael Drake
8f1c9673d7 Fix format string type missmatches on 32-bit systems.
Use C99 inttypes header for format string macros.
2015-05-12 10:19:38 +01:00
Michael Drake
82237d7070 Avoid generating confusing warning.
Now the disc cache will be disabled silently if its too slow.
2015-05-12 10:01:06 +01:00
Vincent Sanders
37aad9c749 Improve the logge dinformation about written cache data 2015-05-08 15:42:49 +01:00
Vincent Sanders
2aef095f27 Ensure bandwidth minimum check is only performed when enough data has
been written.
2015-04-30 14:28:18 +01:00
Vincent Sanders
9927232a2d Improve metadata deserialisation to only update object on success
The low level cache deserialisation was leaving bad data in an low
level cache object in the error case. This fixes it so the object
state only gets modified on successful deserialisation of all the
metadata.
2015-01-28 22:39:39 +00:00
Vincent Sanders
5464dc7778 Ensure no division by zero occours if no time has ever been spent writing llcache 2015-01-03 15:13:40 +00:00
Vincent Sanders
6b645664fe add missing includes 2014-12-27 22:48:37 +00:00
Vincent Sanders
45f98ffd6e improve comments in low level cache and remove completed todo 2014-12-04 21:09:42 +00:00
Vincent Sanders
5bf4b3ff2b move the low bandwidth check to allow for an average over a much longer time 2014-12-03 20:13:10 +00:00
Vincent Sanders
57cd5c77b2 Use translated messgae for low bandwidth error 2014-12-02 10:03:27 +00:00
Vincent Sanders
c9ee49baa8 cope with backing store writeout making no progress 2014-12-01 11:32:33 +00:00
Vincent Sanders
ba5ade87b2 ensure the backing store write reports at least a minimal amount of time 2014-12-01 09:18:31 +00:00
Vincent Sanders
61ab2777da Improve writeout rescheduling if list of objects is completed quickly 2014-11-30 00:27:05 +00:00
Vincent Sanders
d08acbc5ae correctly calculate writeout bandwidth and properly impose limits 2014-11-29 23:57:15 +00:00
Vincent Sanders
6b2676d33f Improve llcache writeout stratagy 2014-11-28 19:17:42 +00:00
Vincent Sanders
8d51dd4879 update the backing store to allow for invalidating entries which have an allocation 2014-11-27 13:31:43 +00:00
Vincent Sanders
79d5b1bf3b stop using gettimeofday and use the monotonic time interface fron nsutils 2014-11-26 21:29:13 +00:00
Vincent Sanders
81417ae4a5 caclulate the total amount of time spent writing an object out
In order to calculate the writeout bandwidth we need to know how long
it took to write the data to peristant storage in addition to how much
was written.
2014-11-25 23:11:41 +00:00
Vincent Sanders
5a78cd810f correctly release source data from llcache 2014-11-23 18:21:56 +00:00
Vincent Sanders
01b2bc5a57 Improve doxygen comments and add todo for cache and backing store 2014-11-23 15:43:03 +00:00
Vincent Sanders
8b810ee4a1 change the persistant data store to owning the allocations 2014-11-22 23:56:43 +00:00
Vincent Sanders
56bb1b03c5 Doxygen cleanups 2014-11-09 12:50:30 +00:00
Vincent Sanders
d06df231bc Update the core to use the split operations table headers
Second in the series to decouple the core API usage from the frontends.
2014-10-16 22:33:43 +01:00
Vincent Sanders
4b2101ba6a clean up the fetcher factory and improve its API 2014-06-19 18:27:24 +01:00
Vincent Sanders
5899f6c16e turn off debugging and add some comments and todo from dsilvers 2014-06-03 22:30:04 +01:00
Daniel Silverstone
b5461c8313 Adjust the llcache behaviour to use scheduler for user notification.
This change updates the llcache to use the scheduler to notify users of the
llcache of events.  This should be just as safe as before and is part of an
effort to remove hlcache_poll and llcache_poll eventually because fetchers
should schedule themselves if need-be.

This is a big change despite the diminutive nature of the patch.  Please report
issues promptly if they turn up after this and are not visible before it.

Signed-off-by: Daniel Silverstone <dsilvers@netsurf-browser.org>
Reviewed-by: Vincent Sanders <vince@netsurf-browser.org>
2014-06-03 17:00:23 +01:00
Vincent Sanders
644fc616b3 attempt to purge low level cache on out of memory during fetch 2014-05-29 14:00:13 +01:00
Michael Drake
7ba459f1b5 Fix leak of url schemes. 2014-05-16 18:58:06 +01:00
Vincent Sanders
ef00272e2f add helpers for time_t reading/writing 2014-05-15 01:18:52 +01:00
Vincent Sanders
1a3ee6090d add strptime compatability 2014-05-13 16:37:49 +01:00
Vincent Sanders
4a49ff5266 Extend low level source data cache with persistant storage 2014-05-13 15:52:58 +01:00
Vincent Sanders
da0b969f25 Improve llcache header processing
By skipping empty headers and correctly dealing with whitespace around
header names we store fewer entries with better adherance to allowed
values in http responses.
2014-03-09 16:22:28 +00:00
Vincent Sanders
25ce52ee64 only try and cache http and https urls 2014-03-09 16:20:53 +00:00
Vincent Sanders
8d883978c6 remove unnecessary caching of whether a url has a query element 2014-03-09 16:20:53 +00:00
Vincent Sanders
20b3c40816 make nsurl_defragment() API more obvious and remove duplicated parameter checking 2014-03-09 16:20:53 +00:00
Vincent Sanders
60973fe5d1 Make llcache debugging less invasive 2014-02-21 11:43:48 +00:00
Vincent Sanders
ff8c37a6ee Witespace cleanup to prepare for backing store addition 2014-02-21 11:31:39 +00:00
Michael Drake
2075ad7ff4 Use corestrings. 2014-01-24 20:19:20 +00:00
Michael Drake
ba9769bc8c Pass fetch redirect info up to content layer as content_msg. Mark redirect origin URLs as visited in browser window content callback. Note this doesn't mean we track redirects, it just lets us get the :visited link style on links that redirect. 2013-05-27 14:51:00 +01:00
Vincent Sanders
848f3d13ca ensure parameter contract is met 2013-05-04 08:52:12 +01:00
Vincent Sanders
82e2fc57d7 free memory on error path 2013-05-01 22:15:24 +01:00
Vincent Sanders
87ee963ff2 Initial changes ready to improve caching decisions 2013-01-07 18:45:29 +00:00
John-Mark Bell
3dff750ae2 Downgrade TLS version support if it turns out the server can't cope with TLSv1.1. 2013-01-04 23:13:23 +00:00
Michael Drake
af89fdb38a Fixup for nsurl urldb. 2012-10-09 11:20:21 +01:00
Vincent Sanders
6f86862edb cleanup and reorganise low level cache source ready for extending with disc cache
svn path=/trunk/netsurf/; revision=13893
2012-04-28 13:24:09 +00:00
John Mark Bell
c22038bed8 Fix bogus cache validation decision
svn path=/trunk/netsurf/; revision=13261
2011-12-08 22:44:19 +00:00
Michael Drake
714f07c48b Rename nsurl_enquire to nsurl_has_component.
svn path=/trunk/netsurf/; revision=13183
2011-11-27 18:32:06 +00:00