Firefox XPCOM ciklu savācējs ēdīs atmiņu

11.janvāra Firefox stumbra (trunk) versijā esot ielikts XPCOM ciklu savācējs.

In general, unfortunately, you should expect this patch to cause the browser to use somewhat more memory and somewhat more CPU time than before the patch lands. It is not a panacea. The purpose of the patch is only to provide infrastructure for simpler ownership rules. Rather than try to reason about which pointer ought to own which other pointer inside gecko, and which pointers are safe to consider weak or raw, you now get a simple and universal rule.


Kā jau autors brīdina, tad ir gaidāms neliels atmiņas rīšanas palielinājums. Es tā sapratu, ka līdz ar šīm izmaiņām turpmāk būs iespējams rakstīt vienkāršāku kodu, piejūgt to pie drazas savācēja (garbage collector), kā rezultātā ilgtermiņā tas varētu pozitīvi atsaukties uz kopējo bildi un varbūt pat tiks sakārtota daļa no atmiņas problēmām.

Note that this is only one memory-management scheme. There are others on the table. In the coming year I’ll be building a variant of Firefox that attempts to use Tamarin’s conservative garbage collector system-wide. That is a more disruptive change, however. The XPCOM cycle collector, believe it or not, is the “least disruptive” of the possible new memory-management schemes we’ve looked at.

Izklausās jau daudzsološi, vienīgi apbēdina tas, ka baigi lēni šis process virzās uz priekšu.

Tweet about this on TwitterShare on FacebookShare on VKShare on RedditShare on Google+Share on LinkedInEmail this to someone

Ieraksti komentāru

Tava e-pasta adrese netiks publicēta.