Item12480: Memory leak in TablePlugin amasses css styles from all visited pages

pencil
Priority: Urgent
Current State: Closed
Released In: 1.1.9
Target Release: patch
Applies To: Extension
Component: TablePlugin
Branches: Release01x01 trunk
Reported By: MichaelDaum
Waiting For:
Last Change By: GeorgeClark
When running foswiki (as recommended) using a perl accellerator like mod_perl or fcgi, TablePlugin will add more and more css to the head of subsequent pages. A %TABLE macro will register css for each table on each page visited. This css is cached internally but never freed from memory again. As a result all further pages get an increasingly large blob of css inlined to the head of the page. In effect your foswiki's performance will degraded rapidly and only free up memory in case the web server is restarted.

Reported by OlafSeng from 1&1.

Quick fix:

--- lib/Foswiki/Plugins/TablePlugin/Core.pm     (revision 16678)
+++ lib/Foswiki/Plugins/TablePlugin/Core.pm     (working copy)
@@ -130,6 +130,7 @@
     $currTablePre         = '';
     $combinedTableAttrs   = {};
     $tableSpecificAttrs   = {};
+    $styles               = {};
 }

Related to Item12302.

-- MichaelDaum - 29 Apr 2013

 

ItemTemplate edit

Summary Memory leak in TablePlugin amasses css styles from all visited pages
ReportedBy MichaelDaum
Codebase 1.1.8, trunk
SVN Range
AppliesTo Extension
Component TablePlugin
Priority Urgent
CurrentState Closed
WaitingFor
Checkins distro:a3e206211a36 distro:534c12f4acf8
TargetRelease patch
ReleasedIn 1.1.9
CheckinsOnBranches Release01x01 trunk
trunkCheckins distro:534c12f4acf8
Release01x01Checkins distro:a3e206211a36
Topic revision: r5 - 19 Nov 2013, GeorgeClark - This page was cached on 27 Jun 2016 - 06:05.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License