|
NetSurf
|
#include <locale.h>#include <signal.h>#include <stdbool.h>#include <stdio.h>#include <stdlib.h>#include <libwapcaplet/libwapcaplet.h>#include <dom/dom.h>#include "netsurf/inttypes.h"#include "utils/config.h"#include "utils/errors.h"#include "utils/nscolour.h"#include "utils/nsoption.h"#include "utils/corestrings.h"#include "utils/log.h"#include "utils/string.h"#include "utils/utf8.h"#include "utils/messages.h"#include "utils/useragent.h"#include "content/content_factory.h"#include "content/fetchers.h"#include "content/hlcache.h"#include "content/mimesniff.h"#include "content/urldb.h"#include "css/css.h"#include "image/image.h"#include "image/image_cache.h"#include "javascript/js.h"#include "html/html.h"#include "text/textplain.h"#include "netsurf/browser_window.h"#include "desktop/system_colour.h"#include "desktop/page-info.h"#include "desktop/searchweb.h"#include "netsurf/misc.h"#include "desktop/gui_internal.h"#include "netsurf/netsurf.h"#include "desktop/browser_private.h"Go to the source code of this file.
Macros | |
| #define | SPECULATE_SMALL 4096 |
| speculative pre-conversion small image size More... | |
| #define | IMAGE_CACHE_CLEAN_TIME (10 * 1000) |
| the time between image cache clean runs in ms. More... | |
| #define | HL_CACHE_CLEAN_TIME (2 * IMAGE_CACHE_CLEAN_TIME) |
| default time between content cache cleans. More... | |
| #define | MINIMUM_MEMORY_CACHE_SIZE (2 * 1024 * 1024) |
| ensure there is a minimal amount of memory for source objetcs and decoded bitmaps. More... | |
| #define | LLCACHE_STORE_MIN_LIFETIME (60 * 30) |
| default minimum object time before object is pushed to backing store. More... | |
| #define | LLCACHE_STORE_MIN_BANDWIDTH (128 * 1024) |
| default minimum bandwidth for backing store writeout. More... | |
| #define | LLCACHE_STORE_MAX_BANDWIDTH (1024 * 1024) |
| default maximum bandwidth for backing store writeout. More... | |
| #define | LLCACHE_STORE_TIME_QUANTUM (100) |
| default time quantum with which to calculate bandwidth (ms) More... | |
Functions | |
| static void | netsurf_lwc_iterator (lwc_string *str, void *pw) |
| nserror | netsurf_init (const char *store_path) |
| Initialise netsurf core. More... | |
| void | netsurf_exit (void) |
| Clean up components used by gui NetSurf. More... | |
| #define HL_CACHE_CLEAN_TIME (2 * IMAGE_CACHE_CLEAN_TIME) |
| #define IMAGE_CACHE_CLEAN_TIME (10 * 1000) |
| #define LLCACHE_STORE_MAX_BANDWIDTH (1024 * 1024) |
| #define LLCACHE_STORE_MIN_BANDWIDTH (128 * 1024) |
| #define LLCACHE_STORE_MIN_LIFETIME (60 * 30) |
| #define LLCACHE_STORE_TIME_QUANTUM (100) |
| #define MINIMUM_MEMORY_CACHE_SIZE (2 * 1024 * 1024) |
| #define SPECULATE_SMALL 4096 |
speculative pre-conversion small image size
Experimenting by visiting every page from default page in order and then netsurf homepage
0 : Cache hit/miss/speculative miss/fail 604/147/ 0/0 (80%/19%/ 0%/ 0%) 2048 : Cache hit/miss/speculative miss/fail 622/119/ 17/0 (82%/15%/ 2%/ 0%) 4096 : Cache hit/miss/speculative miss/fail 656/109/ 25/0 (83%/13%/ 3%/ 0%) 8192 : Cache hit/miss/speculative miss/fail 648/104/ 40/0 (81%/13%/ 5%/ 0%) ALL : Cache hit/miss/speculative miss/fail 775/ 0/161/0 (82%/ 0%/17%/ 0%)
| void netsurf_exit | ( | void | ) |
Clean up components used by gui NetSurf.
Finalise NetSurf core.
Definition at line 232 of file netsurf.c.
References content_factory_fini(), corestrings_fini(), fetcher_quit(), free_user_agent_string(), guit, hlcache_finalise(), hlcache_stop(), image_cache_fini(), js_finalise(), messages_destroy(), netsurf_table::misc, netsurf_lwc_iterator(), ns_system_colour_finalize(), NSLOG, page_info_fini(), gui_misc_table::quit, search_web_finalise(), urldb_destroy(), and utf8_finalise().
Referenced by main(), nsbeos_replicant_main_thread(), nsgtk_finalise(), and WinMain().
| nserror netsurf_init | ( | const char * | store_path | ) |
Initialise netsurf core.
| store_path | path to persistant storage. |
Definition at line 107 of file netsurf.c.
References image_cache_parameters::bg_clean_time, hlcache_parameters::bg_clean_time, corestrings_init(), llcache_parameters::fetch_attempts, fetcher_init(), HL_CACHE_CLEAN_TIME, hlcache_initialise(), html_init(), image_cache_parameters::hysteresis, llcache_store_parameters::hysteresis, IMAGE_CACHE_CLEAN_TIME, image_cache_init(), image_init(), js_initialise(), image_cache_parameters::limit, llcache_store_parameters::limit, llcache_parameters::limit, hlcache_parameters::llcache, LLCACHE_STORE_MAX_BANDWIDTH, LLCACHE_STORE_MIN_BANDWIDTH, LLCACHE_STORE_MIN_LIFETIME, LLCACHE_STORE_TIME_QUANTUM, MINIMUM_MEMORY_CACHE_SIZE, ns_system_colour_init(), nscolour_update(), nscss_init(), NSERROR_OK, NSLOG, nsoption_charp, nsoption_int, nsoption_uint, page_info_init(), llcache_store_parameters::path, PRIsizet, SPECULATE_SMALL, llcache_parameters::store, and textplain_init().
Referenced by gui_init_replicant(), main(), and WinMain().
|
static |
Definition at line 100 of file netsurf.c.
References NSLOG.
Referenced by netsurf_exit().