Goto main content

static

Put a file in memory to optimize speed.

STATIC

NAME

static - Put a file in memory to optimize speed.

SYNOPSIS

static(list:true,clear:true)

DESCRIPTION

The file is automatically put into memory. Next time this file is access, the memory version will be read.

To invalidate/clear the file in memory, you need to call static with parameter clear set to true.

To get a list of file in the cache, called static with list set to true.

If list or clear is set, than the current file is not cache. In all other case, the current file is cache.

RETURN

None or the list of file in the cache in an array.

PERFORMANCE

Version 5.0.5 Test of static

Test http://v5.sednove.ca/tests/static2.sn Page html simple v5.0.5 avec extenso parallelisme = 5, requete = 1000, nb = 10

Moyenne: 895.24 requtes/seconde

Test http://v5.sednove.ca/tests/static3.sn Page html simple v5.0.5 avec extenso avec static parallelisme = 5, requete = 1000, nb = 10

Moyenne: 1362.42 requetes/seconde

Test http://v5.sednove.ca/tests/static1.html Page sans Extenso parallelisme = 5, requete = 1000, nb = 10

Moyenne: 881.96 requetes/seconde

Conclusion:

Page with static is 65% faster.

EXAMPLES

static();
static(); static(list:"true"); [ "...", "..." ]
static(clear:true); static(list:true);

SEE ALSO

AUTHOR

Written by Pierre Laplante, <laplante@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.