Author: titmuss
Date: Fri Mar  7 10:28:13 2008
New Revision: 2097

URL: http://svn.slimdevices.com?rev=2097&root=Jive&view=rev
Log:
Bug: 7343
Description:
More memory fixes. Reduce the artwork cache to 10M for testing.


Modified:
    branches/7.0/jive/src/pkg/jive/share/jive/slim/ArtworkCache.lua
    branches/7.0/jive/src/pkg/jive/share/jive/slim/SlimServer.lua

Modified: branches/7.0/jive/src/pkg/jive/share/jive/slim/ArtworkCache.lua
URL: 
http://svn.slimdevices.com/branches/7.0/jive/src/pkg/jive/share/jive/slim/ArtworkCache.lua?rev=2097&root=Jive&r1=2096&r2=2097&view=diff
==============================================================================
--- branches/7.0/jive/src/pkg/jive/share/jive/slim/ArtworkCache.lua (original)
+++ branches/7.0/jive/src/pkg/jive/share/jive/slim/ArtworkCache.lua Fri Mar  7 
10:28:13 2008
@@ -19,8 +19,8 @@
 module(..., oo.class)
 
 
--- Limit artwork cache to 15 Mbytes
-local ARTWORK_LIMIT = 15 * 1024 * 1024
+-- Limit artwork cache to 10 Mbytes
+local ARTWORK_LIMIT = 10 * 1024 * 1024
 
 
 function __init(self)
@@ -118,6 +118,9 @@
                self.lru = entry.prev
 
                self.total = self.total - entry.value:getBytes()
+
+               entry.prev = nil
+               entry.next = nil
        end
 
        if log:isDebug() then

Modified: branches/7.0/jive/src/pkg/jive/share/jive/slim/SlimServer.lua
URL: 
http://svn.slimdevices.com/branches/7.0/jive/src/pkg/jive/share/jive/slim/SlimServer.lua?rev=2097&root=Jive&r1=2096&r2=2097&view=diff
==============================================================================
--- branches/7.0/jive/src/pkg/jive/share/jive/slim/SlimServer.lua (original)
+++ branches/7.0/jive/src/pkg/jive/share/jive/slim/SlimServer.lua Fri Mar  7 
10:28:13 2008
@@ -479,6 +479,14 @@
                -- on error, print something...
                if err then
                        logcache:error("_getArtworkThumbSink(", iconId, ", ", 
size, ") error: ", err)
+
+                       -- free artworkThumbIcons entry
+                       local icons = self.artworkThumbIcons
+                       for icon, key in pairs(icons) do
+                               if key == cacheKey then
+                                       icons[icon] = nil
+                               end
+                       end
                end
                -- if we have data
                if chunk then

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins

Reply via email to