Timezone.Runtime_timezone_compiler memory footprint

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Timezone.Runtime_timezone_compiler memory footprint

Stephen R. van den Berg
I have been eliminating some memory leaks from the Shuffler, while
running my SPike webserver.  Things seem to have stabilised now.
However, when inspecting the memory footprint, I see the dump at the
bottom of this mail.

Now, in the grand scheme of things, 850.4kB might not be a lot, but
I'm still wondering why it is still being occupied.
I mean, I get that because I've been accessing timezones somewhere
(though I'm still wondering where exactly), it needs to compile
the current timezone.  However, after having done that, the timezone
compiler should have been freed, and it appears that it is not.
Any clues as to why this is happening?

----------------------------------------------------------------------
Object                            Clones   Memory                  Loc
----------------------------------------------------------------------
imezone.Runtime_timezone_compiler      1   850.4k    Timezone.pmod:541
s.Builtin()->multi_string_replace     32   282.1k    builtin.cmod:4347
Runtime_timezone_compiler()->Zone    386   151.7k   Timezone.pmod:1065
Sql.pgsql_util.conxiin                 1    96.5k  pgsql_util.pmod:404
Runtime_timezone_compiler()->Rule    139    86.0k    Timezone.pmod:811
master()->dirnode                     29    81.6k     master.pike:2574
MIME.ext_to_media_type                 1    65.4k ext_to_media_type.pmod:1659
master                                 1    47.9k          master.pike
Standards.ASN1.Types.Identifier      200    42.8k       Types.pmod:626
master()->joinnode                    30    36.7k     master.pike:3013
Parser._parser.HTML                    3    24.8k         parser.c:196
_static_modules.Builtin()->Search      1    16.1k    pike_search.c:188
piler()->__class_66275_0_line_791      1    15.5k    Timezone.pmod:792
Standards.PKCS.Identifiers             1    10.0k     Identifiers.pmod
Calendar.Language.cEN                  1     6.3k    Language.pmod:525
/main()->SPike                         1     5.5k             spike:64
Nettle.BufferedCipher()->_Buffer      49     4.2k      cipher.cmod:533
sites.pmod                             1     4.1k           sites.pmod
managebackground.pmod                  1     3.6k managebackground.pmod
Sql.pgsql_util.proxy                   1     3.2k pgsql_util.pmod:1965
.Builtin()->single_string_replace     18     2.3k    builtin.cmod:4507
Stdio.FILE                             4     2.3k     module.pmod:1927
Crypto.DH.Parameters                  17     2.3k           DH.pmod:71
TP.Server.Request()->OutputBuffer      1     2.2k     Request.pike:908
Regexp.SimpleRegexp                   10     2.2k       Regexp.pmod:48
Sql.pgsql_util                         1     2.1k      pgsql_util.pmod
_static_modules._Stdio()->Buffer       4     2.1k       buffer.cmod:77
_static_modules.Builtin()->mutex      14     1.9k       threads.c:4690
es.Builtin()->DefaultBackendClass      4     1.8k    backend.cmod:3253
Pike.Lazy                             13     1.8k         Lazy.pmod:19
Calendar.ISO                           2     1.5k          ISO.pmod:11
atic_modules.Builtin()->thread_id      5     1.4k       threads.c:4816
/main()->SPike()->regex               12     1.4k            spike:459
/main()->SPike()->singleresponse       2     1.2k            spike:578
/main()->SPike()->fromfilesystem       7     1.2k            spike:610
Thread.Queue                           3     1.1k      Thread.pmod:241
Stdio.File                             2     1.1k      module.pmod:188
_static_modules.Gmp()->mpz             4     0.9k      mpz_glue.c:2476
Val.Inet                               9     0.9k            Inet.pike
les.Builtin()->Backend()->CallOut      4     0.8k     backend.cmod:509
atic_modules.Builtin()->condition      6     0.8k       threads.c:4766
_static_modules._Stdio()->Fd           3     0.8k        file.cmod:282
Nettle.BlockCipher()->_IGE             7     0.7k     cipher.cmod:1606
Nettle.BlockCipher()->_PCBC            7     0.7k     cipher.cmod:1450
Nettle.BlockCipher()->_CBC             7     0.7k     cipher.cmod:1124
Nettle.BlockCipher()->_OFB             7     0.7k     cipher.cmod:3196
Nettle.BlockCipher()->_ABC             7     0.7k     cipher.cmod:1987
Nettle.BlockCipher()->_CFB             7     0.7k     cipher.cmod:2367
Standards.ASN1.Types.MetaExplicit      6     0.7k      Types.pmod:1071
Nettle.BlockCipher()->_CTR             7     0.6k     cipher.cmod:2825
odules.Builtin()->pike_trampoline      6     0.5k    builtin.cmod:7330
Calendar.Rule.Timezone                 5     0.5k         Rule.pmod:19
destructed                             0     0.0k                    -
----------------------------------------------------------------------

--
Stephen.
Reply | Threaded
Open this post in threaded view
|

Timezone.Runtime_timezone_compiler memory footprint

Martin Nilsson (Coppermist) @ Pike (-) developers forum
The timezone compiler is cached so that you con't need to recreate it
the next time _magic_timezone() is called.