Firefox 4.0 RC has huge memory leak + slow down problem

Firefox 4.0 RC Seems to have a huge memory leak issue. After leaving the program open for around half an hour the RAM usage climbs to over 1 gb.
However, I have 12 gb of physical ram, so firefox staking 1 gb for itself is not too big of a problem (and is probably a blessing as it means it's caching more data), but the problem is that the UI begins to slow down and become clunky after about 30 minutes.
Browsing, switching tabs, even typing becomes jittery and not very responsive.
This happens regardless of how many tabs I have open.
Now it's also crashing every once in a while.

Even with Firefox 4.0 (Release) running in Safe Mode, with all add-ons and themes disabled, I'm still inclined to think there's something screwy going on here.
I was watching Page Faults/sec, Page File Bytes and Working Set in Performance Monitor and tailing the Privoxy log for requests. Even with Firefox minimized and "doing nothing" (making no requests, anyway), over the space of a 10 minute period the Working Set grew from 244,375,552 bytes to 274,939,004 bytes (averaging 50,939 bytes/second). This behaviour doesn't seem consistent though - sometimes it doesn't seem to grow at all.
Additionally the Page Faults/Sec went nuts, accompanied by a step in Page File Bytes and Working Set, whenever a request got made to http://safebrowsing.clients.google.com/safebrowsing/downloads which seems to happens on a regular basis (approximately every 30 minutes).

Similar Messages

  • Firefox sometimes uses a lot of memory and slows down my computer, can this be prevented ? I am running Windows XP.

    I sometimes get a message that Firefox is using a large amount of memory.

    * Make sure that you do not use [[Clear Recent History]] to clear the "Browsing History"
    App tabs and Tab Groups (Panorama) are stored as part of the session data in the file sessionstore.js in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder]
    * http://kb.mozillazine.org/Session_Restore

  • Firefox 17 huge memory leak

    Since the last update today, Firefox seems to got a huge memory leak. After one hour idle on some pages it was up to 750MB memory usage, and constant 100% load of one CPU core.
    Looks like something is not going well with the garbage collection, if I visit http://www.robertsspaceindustries.com/forums/forum/forum-category-2/ for example.
    Had to disable the graphic hardware acceleration, because of the newly introduced "clear type" font bug.
    Edit: May also be related to mail.google.com, which I have running in an app tab.

    For what it's worth, I had exactly the same problem (except that it's on Linux) since the upgrade to 17.0. When I disabled greasemonkey, the problem instantly disappeared, so it looks like the compatibility with greasemonkey got broken.
    Likewise, I'm very disappointed with the frequent bugs/annoyances that come with the rolling upgrade system; I find myself more and more using Chromium because of it. Mozilla really needs to give people the option to run a stable branch that receives security updates only.

  • Firefox has a memory leak and I need to update it, but I want to keep 3.5 because I don't like how the newest version of Firefox is set up.

    My computer is running low on RAM, and when I look at what processes are using the most memory, firefox is the number one using between 28,000 to 93,000k, so I'm guessing that it has a memory leak.
    And because of that memory leak I have to update firefox, however I really dislike the newest version of firefox and I'd prefer to stick with the version I have, which is 3.5.

    Often the memory problems are not just from Firefox in isolation, but partly relating to all the extensions available for it and then the videos and animations it runs on media rich sites.
    The first thing to do is to upgrade to firefox 3.6 which is at least a supported version (Maybe not for much longer)
    * see [[updating firefox]]
    Next version after 3.6 is 4, you should avoid that, it did have some memory problems, that were worse than 3,6 and firefox 4 is no longer secure or supported.
    The techies at Firefox have been working on memory problems recently and have made many improvements, but some of these improvements are only seen in the trial versions of Firefox.
    I would in fact suggest you upgrade to Firefox 5 the current release version (soon to be replaced with Firefox 6)
    I am able to run Firefox v3.6 to v8 on legacy XPs with less than 1GB RAM. Firefox in itself is not necessarily very demanding in terms of RAM. I am not sure what the figures are you are quoting, or whether they are high. ( Note 1Gb is in the order of 1 000 000 k )
    As for not liking the set-up of new versions of Firefox, there is quite abit that can be changed, maybe you would be able to configure it more to your liking with little effort.

  • Suddenly, I'm getting a huge memory leak

    Since somewhere in Firefox version 36 and continuing to the present (ver 37.0.1), I am getting a major memory leak. I am using Mac OS 10.9.5. And this is what I've done so far: reduced the number of tabs (now at about 4 or 5). Have a minimal amount of plugins and extensions. Maybe 5. I've reset Firefox but the leak still occurs.
    This happens when I leave Firefox open overnight. It's only been happening for about the last month. In the morning I find that all my apps have been paused for lack of memory. Looking at the activity monitor I see that my kernel_task is using 9.5GB of memory (when it should be about 1GB). Quitting Firefox solves the problem. But this has never happened before.
    Also, sometimes Firefox will crash saying the Shockwave plugin quit. I have updated to the latest Flash plugin but it still happens.

    The three Add-ons you mentioned are extensions (Firefox/Tools > Add-ons > Extensions).
    Note that an extension like Firefox bug can cause issues with memory leaks.
    If it works in Safe Mode and in normal mode with all extensions (Firefox/Tools > Add-ons > Extensions) disabled then try to find which extension is causing it by enabling one extension at a time until the problem reappears.
    Close and restart Firefox after each change via "Firefox > Exit" (Windows: Firefox/File > Exit; Mac: Firefox > Quit Firefox; Linux: Firefox/File > Quit)
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    You can try to close the browsing area and only leave the menu bar visible to see if the leak still happens.
    What I meant above was plugins like Flash or Java (Firefox/Tools > Add-ons > Plugins) that might be used on tabs if you keep the browsing area open with some tabs with web pages.
    *https://support.mozilla.org/kb/Troubleshooting+plugins

  • HUGE memory leak when using MP3

    I downloaded a new FME 2.0 and noticed they added an option
    to stream in MP3 format. DO NOT USE that mode (!). If you start
    streaming in MP3 format you will get a huge memory leak on the
    client side. Your browser starts eating memory like crazy and it
    will bury your machine withing an hour or two by taking all the
    memory available. I have proved it on several machines, notifed
    Adobe. They confirmed it as a bug and promised to fix in the future
    releases. Nice, huh? and what people are supposed to do with the
    current build?

    A new build 2.0.1.1114 has been posted . Please try and let
    us know if you face this issue with this build.

  • Huge Memory Leak - Need help.

    Hi,
    There is a huge memory leak in our application. Because of this there are frequent session timeout. When we analysed the heap dump using Memory Analyser Tool, we got the leak suspects and the problem suspects are as below:
    One instance of "org.apache.jasper.compiler.JspRuntimeContext" loaded by "org.apache.catalina.loader.StandardClassLoader @ 0x87ff8098" occupies 161,832,200 (23.30%) bytes. The memory is accumulated in one instance of "java.util.concurrent.ConcurrentHashMap$Segment[]" loaded by "<system class loader>".
    One instance of "org.apache.catalina.tribes.tipis.LazyReplicatedMap" loaded by "org.apache.catalina.loader.StandardClassLoader @ 0x87ff8098" occupies 133,578,920 (19.23%) bytes. The memory is accumulated in one instance of "java.util.concurrent.ConcurrentHashMap$Segment[]" loaded by "<system class loader>".
    185 instances of "org.apache.jasper.runtime.BodyContentImpl", loaded by "org.apache.catalina.loader.StandardClassLoader @ 0x87ff8098" occupy 133,502,776 (19.22%) bytes.
    What could be the root cause for this error and how to resolve this?

    First, in general you not provided enough details to get any help. OS? OS version? Hardware specifics?
    Second, are you running custom code? If so, post it so you can get help.
    Third, if you're not running custom code, the odds of you having a "huge memory leak" are pretty small.

  • My iMac Mid 2010 Has Suddenly Started To Slow Down.

    Hello,
    My iMac has suddenly started to slow down. It was fine just a week ago.. Login time has increased, Applications take a while to start and they can sometimes make my computer unresponsive.
    Finder freezes and so does safari.
    I have deleted ALOT of old files and things i don't use anymore. I deleted my Windows Partition. I have also tried my options in disk utility but it seems to have not no effect. I also re-installed Mavericks.
    I don't know what else to try. Please let me know if there is anything i haven't tried.
    Specs:
    21.5 Inch Mid 2010
    3.2 GHz Intel Core i3
    4GB DDR3
    ATI Radeon HD 5670 512 MB

    EtreCheck version: 2.0.11 (98)
    Report generated November 23, 2014 at 11:42:49 AM PST
    Hardware Information: ℹ️
      iMac (21.5-inch, Mid 2010) (Verified)
      iMac - model: iMac11,2
      1 3.2 GHz Intel Core i3 CPU: 2-core
      4 GB RAM Upgradeable
      BANK 0/DIMM0
      empty empty empty empty
      BANK 1/DIMM0
      empty empty empty empty
      BANK 0/DIMM1
      2 GB DDR3 1333 MHz ok
      BANK 1/DIMM1
      2 GB DDR3 1333 MHz ok
      Bluetooth: Old - Handoff/Airdrop2 not supported
      Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
      ATI Radeon HD 5670 - VRAM: 512 MB
      iMac 1920 x 1080
    System Software: ℹ️
      OS X 10.9.5 (13F34) - Uptime: 0:40:21
    Disk Information: ℹ️
      WDC WD1001FALS-40Y6A0 disk0 : (1 TB)
      S.M.A.R.T. Status: Verified
      EFI (disk0s1) <not mounted> : 210 MB
      Macintosh HD (disk0s2) /  [Startup]: 779.00 GB (193.97 GB free)
      Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
      HL-DT-STDVDRW  GA32N 
    USB Information: ℹ️
      Apple Inc. BRCM2046 Hub
      Apple Inc. Bluetooth USB Host Controller
      Apple Internal Memory Card Reader
      Logitech USB Receiver
      Apple Computer, Inc. IR Receiver
      Apple Inc. Built-in iSight
    Configuration files: ℹ️
      /etc/hosts - Count: 20
    Gatekeeper: ℹ️
      Mac App Store and identified developers
    Kernel Extensions: ℹ️
      /Library/Extensions
      [loaded] com.rim.driver.BlackBerryUSBDriverInt (2.2.7 - SDK 10.7) Support
      [loaded] com.rim.driver.BlackBerryVirtualPrivateNetwork (1.0.18 - SDK 10.8) Support
      /System/Library/Extensions
      [not loaded] com.BlackBerry.driver.USBCDCNCM (1.0.6 - SDK 10.7) Support
      [loaded] com.Cycling74.driver.Soundflower (1.6.6 - SDK 10.6) Support
      [not loaded] com.mice.driver.Wireless360Controller (1.0.0d12 - SDK 10.8) Support
      [not loaded] com.mice.driver.WirelessGamingReceiver (1.0.0d12 - SDK 10.8) Support
      [not loaded] com.mice.driver.Xbox360Controller (1.0.0d12 - SDK 10.8) Support
      [not loaded] com.quark.driver.Tether (1.1.0d4 - SDK 10.4) Support
      [loaded] com.quark.driver.Tether64 (1.1.0d3 - SDK 10.6) Support
      [not loaded] com.rim.driver.BlackBerryUSBDriverVSP (0.0.74) Support
      [not loaded] com.seagate.driver.PowSecDriverCore (5.0.1) Support
      [not loaded] org.walisser.driver.DWXBoxHIDDriver (1.3.4) Support
      /System/Library/Extensions/Seagate Storage Driver.kext/Contents/PlugIns
      [not loaded] com.seagate.driver.PowSecLeafDriver_10_4 (5.0.1) Support
      [not loaded] com.seagate.driver.PowSecLeafDriver_10_5 (5.0.1) Support
      [not loaded] com.seagate.driver.SeagateDriveIcons (5.0.1) Support
    Startup Items: ℹ️
      FanControlDaemon: Path: /Library/StartupItems/FanControlDaemon
      Startup items are obsolete and will not work in future versions of OS X
    Problem System Launch Agents: ℹ️
      [invalid?] com.paragon.NTFS.auth.plist Support
    Launch Agents: ℹ️
      [not loaded] com.adobe.AAM.Updater-1.0.plist Support
      [loaded] com.lexmark.bmlaunchd.plist Support
      [loaded] com.lexmark.lexnetlaunchd.plist Support
      [running] com.rim.BBAlbumArtCacher.plist Support
      [running] com.rim.BBLaunchAgent.plist Support
      [running] com.rim.blackberrylink.BlackBerry-Link-Helper-Agent.plist Support
      [running] com.rim.PeerManager.plist Support
      [running] com.seagate.SeagateStorageGauge.plist Support
    Launch Daemons: ℹ️
      [loaded] com.adobe.fpsaud.plist Support
      [invalid?] com.adobe.SwitchBoard.plist Support
      [running] com.cleverfiles.cfbackd.plist Support
      [loaded] com.macpaw.CleanMyMac2.Agent.plist Support
      [running] com.mice.360Daemon.plist Support
      [loaded] com.microsoft.office.licensing.helper.plist Support
      [running] com.rim.BBDaemon.plist Support
      [not loaded] com.rim.nkehelper.plist Support
      [running] com.rim.tunmgr.plist Support
    User Launch Agents: ℹ️
      [loaded] com.adobe.AAM.Updater-1.0.plist Support
      [loaded] com.macpaw.CleanMyMac2Helper.scheduledScan.plist Support
      [loaded] com.macpaw.CleanMyMac2Helper.trashWatcher.plist Support
      [loaded] com.valvesoftware.steamclean.plist Support
    User Login Items: ℹ️
      iTunesHelper ApplicationHidden (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
      Dropbox UNKNOWN (missing value)
    Internet Plug-ins: ℹ️
      FlashPlayer-10.6: Version: 15.0.0.223 - SDK 10.6 Support
      QuickTime Plugin: Version: 7.7.3
      Flash Player: Version: 15.0.0.223 - SDK 10.6 Support
      GarminGPSControl: Version: 3.0.1.0 Release - SDK 10.4 Support
      Default Browser: Version: 537 - SDK 10.9
      SharePointBrowserPlugin: Version: 14.0.0 Support
      Google Earth Web Plug-in: Version: 6.0 Support
      Unity Web Player: Version: UnityPlayer version 4.5.2f1 - SDK 10.6 Support
      Silverlight: Version: 5.1.10411.0 - SDK 10.6 Support
      iPhotoPhotocast: Version: 7.0 - SDK 10.8
    Safari Extensions: ℹ️
      Facebook Cleaner
      YoutubeWide
      Facebook Photo Zoom
    3rd Party Preference Panes: ℹ️
      Fan Control  Support
      Flash Player  Support
      Growl  Support
      Paragon NTFS for Mac ® OS X  Support
      XBox 360 Controllers  Support
      DWXBoxHIDPrefsPane  Support
    Time Machine: ℹ️
      Time Machine not configured!
    Top Processes by CPU: ℹ️
          2% WindowServer
          0% fontd
          0% coreservicesd
          0% FanControlDaemon
          0% SystemUIServer
    Top Processes by Memory: ℹ️
      129 MB Safari
      125 MB mds_stores
      116 MB com.apple.IconServicesAgent
      64 MB com.apple.WebKit.WebContent
      52 MB Dock
    Virtual Memory Information: ℹ️
      1.97 GB Free RAM
      1.28 GB Active RAM
      434 MB Inactive RAM
      614 MB Wired RAM
      395 MB Page-ins
      0 B Page-outs

  • I have a macbook pro 1.5 years old ver10.7.5 and now having a problem with having to manually force quit after a hour or so of use to clear up memory(unit slows down) should I up grade iso if so to what

    I have a macbook pro 1.5 years old ver10.7.5 and now having a problem with having to manually force quit after a hour or so of use to clear up memory(unit slows down) should I up grade iso if so to what and what is the correct procedure?  Rick

    To determine if it is, boot into Safe Mode and see what happens. http://support.apple.com/kb/HT1455
    In the Activity Monitor, what are the Page Outs and Page Ins?

  • Firefox 21.0 on OS X 10.8.4 still has a memory leak that occurs with no Add ons, 1 tab and leads to 3GB of memory usage in 10 minutes.

    While using Firefox 21.0 on OS X 10.8.4 with 4GB RAM, Firefox memory usage marches up and up until at 3GB (on my iMac) Firefox hangs and is 100% non-responsive and must be killed with Force Quit. It takes 10 minutes to occur.
    No Add Ons
    One tab

    John99,
    Unfortunately, the problem was WORSE in FF 22.0. I regressed to FF21.0 and shut off automatic updates. I may even go back to FF3.6, which is the last one where I didn't see this problem.
    Thank you for trying but as a longstanding developer I know that pervasive memory leaks is a sign of a broken development process. Thank you for trying...

  • Huge memory leaks after upgrading from kernel 2.6.38(?)

    My system began leaking memory some months ago and I've little to no idea what is causing it. The closest hint I can give is that I think these problems started around upgrading from Linux 2.6.38 to 2.6.39 and have continued with 3.0 aswell. Sometimes my whole system freezes due to extensive swapping (HDD usage led stays lit), sometimes it stops after consuming almost all of my 4 GB RAM.
    I think the leak has to come from inside the kernel because all sysmon apps claim no application is eating too much RAM yet the system memory consumption is at 100 % or even using swap. Even after I kill Xorg the memory usage will stay at least at 2.0 GB, when it should be less than half a gig.
    I'd like to guess the blame is on Nouveau, because it was giving me a hell of a time back with Linux 2.6.39. It had a habit of freezing my system when re-enabling suspended compositing (both with Kwin and Mutter). Also video playback was corrupted sometimes. These probs have since been fixed with Linux 3.0.
    I cannot name any spesific app that might trigger this memory leaking. I don't play any games and mainly use Firefox, Chromium and VLC day in, day out.
    There seems to be absolutely no way of reclaiming the reserved memory than rebooting the whole system. I have even tried unloading Nouveau.
    I am currently running the [testing] repo with ~daily upgrades.
    Last edited by Verge (2011-08-16 14:04:09)

    OK, this kind of surprised me. No wonder I couldn't find any relevant stuff while googling for kernel issues. I have had Strigi disabled for some time now because it is miserably broken, but I now disabled the whole Nepomuk too. Let's see if my problem now goes away or what...
    The release of KDE 4.7 Beta 1 actually lines up with the launch of Linux 2.6.39 so this really might be the case. I moved to KDE 4.7 already with the first beta.
    Last edited by Verge (2011-08-16 14:30:37)

  • Version 23.0 on Windows 7 64 bit has major memory leak issues, how do I fix or revert to version 22?

    Upon updating to version 23.0.1, the memory usage on Firefox routinely runs over 1GB and eventually causes me to restart the application. This is directly linked to an upgrade in August to version 23.0.1, I would like to either downgrade or fix the problem with 23. IF this is an issue with plug-ins, how do I determine that? My problem is that this only started occurring after I installed version 23, so I have to assume it was caused by that and not by some plug in as those have not changed.
    Was the application regression tested against all plug-ins to ensure these issues did not occur?

    Hello,
    The first thing I suggest is updating your Firefox to v24 (the latest version). Every new version of Firefox brings bug fixes and security updates. It maybe that whatever is causing high RAM usage will be solved by the update.
    [[Update Firefox to the latest version]]
    If you find that the problem is still occurring in v24 then please see the support article here:
    [[Firefox uses too much memory (RAM) - How to fix]]
    This has various tips on diagnosing and fixing high RAM usage issues.
    I particularly suggest that you try:
    * Updating plugins
    * Checking your extensions and themes to see if any of these are to blame
    * Trying the memory troubleshooting tools (about:memory)
    I hope that helps. Let me know if not.

  • Huge memory leak when closing PDF from Hyperlink

    I was wondering if anyone else has experienced this issue with Adobe Reader 11.0.10 on Windows 7 64bit:
    1. I have a list of hyperlinks in an Access Table to certain PDF files on a local network folder.
    2. Clicking the hyperlink opens the corresponding PDF.
    The PDF file opens just fine, and renders normally. The issue is when I attempt to close the PDF. This results in an instant Memory leak that will grow to 4GB in under 10 seconds. System crashes completely. I can reproduce the crash in Safe Mode as well. I am able to open/close the PDF from its source location normally without incident. Clean Uninstall/Reinstall produces the same results.
    Downgrade to Adobe 10 fixes the problem completely. I can reproduce the problem on all computers on my network (all running windows 7 32bit or 64bit) by upgrading to Reader 11.0.10.
    I prefer to keep my software updated to prevent vulnerabilities, so any help would be appreciated.

    That is very strange because it is a 32-bit program and cannot (according to popular wisdom) grow over 2 GB. Also, if it were to reach 2 GB it would simply crash, not break the system.
    Do you have a screen shot showing the 4 GB? There might be clues there what is happening.

  • Huge memory leaks in using PL/SQL tables and collections

    I have faced a very interesting problem recently.
    I use PL/SQL tables ( Type TTab is table of ... index by binary_integer; ) and collections ( Type TTab is table of ...; ) in my packages very widely. And have noticed avery strange thing Oracle does. It seems to me that there are memory leaks in PGA when I use PL/SQL tables or collections. Let me a little example.
    CREATE OR REPLACE PACKAGE rds_mdt_test IS
    TYPE TNumberList IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
    PROCEDURE test_plsql_table(cnt INTEGER);
    END rds_mdt_test;
    CREATE OR REPLACE PACKAGE BODY rds_mdt_test IS
    PROCEDURE test_plsql_table(cnt INTEGER) IS
    x TNumberList;
    BEGIN
    FOR indx IN 1 .. cnt LOOP
    x(indx) := indx;
    END LOOP;
    END;
    END rds_mdt_test;
    I run the following test code:
    BEGIN
    rds_mdt_test.test_plsql_table (1000000);
    END;
    and see that my session uses about 40M in PGA.
    If I repeat this example in the same session creating the PL/SQL table of smaller size, for instance:
    BEGIN
    rds_mdt_test.test_plsql_table (1);
    END;
    I see again that the size of used memory in PGA by my session was not decreased and still be the same.
    The same result I get if I use not PL/SQL tables, but collections or varrays.
    I have tried some techniques to make Oracle to free the memory, for instance to rewrite my procedure in the following ways:
    PROCEDURE test_plsql_table(cnt INTEGER) IS
    x TNumberList;
    BEGIN
    FOR indx IN 1 .. cnt LOOP
    x(indx) := indx;
    END LOOP;
    x.DELETE;
    END;
    or
    PROCEDURE test_plsql_table(cnt INTEGER) IS
    x TNumberList;
    BEGIN
    FOR indx IN 1 .. cnt LOOP
    x(indx) := indx;
    END LOOP;
    FOR indx in 1 .. cnt LOOP
    x.DELETE(indx);
    END LOOP;
    END;
    or
    PROCEDURE test_plsql_table(cnt INTEGER) IS
    x TNumberList;
    empty TNumberList;
    BEGIN
    FOR indx IN 1 .. cnt LOOP
    x(indx) := indx;
    END LOOP;
    x := empty;
    END;
    and so on, but result was the same.
    This is a huge problem for me as I have to manipulate collections and PL/SQL tables of very big size (from dozens of thousand of rows to millions or rows) and just a few sessions running my procedure may cause server's fall due to memory lack.
    I can not understand what Oracle reseveres such much memory for (I use local variables) -- is it a bug or a feature?
    I will be appreciated for any help.
    I use Oracle9.2.0.1.0 server under Windows2000.
    Thank you in advance.
    Dmitriy.

    Thank you, William!
    Your advice about using DBMS_SESSION.FREE_UNUSED_USER_MEMORY was very useful. Indeed it is the tool I was looking for.
    Now I write my code like this
    declare
    type TTab is table of ... index binary_integer;
    res TTab;
    empty_tab TTab;
    begin
    res(1) := ...;
    res := empty_tab;
    DBMS_SESSION.FREE_UNUSED_USER_MEMORY;
    end;
    I use construction "res := empty_tab;" to mark all memory allocated to PL/SQL table as unused according to Tom Kyte's advices. And I could live a hapy life if everything were so easy. Unfortunately, some tests I have done showed that there are some troubles in cleaning complex nested PL/SQL tables indexed by VARCHAR2 which I use in my current project.
    Let me another example.
    CREATE OR REPLACE PACKAGE rds_mdt_test IS
    TYPE TTab0 IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
    TYPE TRec1 IS RECORD(
    NAME VARCHAR2(4000),
    rows TTab0);
    TYPE TTab1 IS TABLE OF TRec1 INDEX BY BINARY_INTEGER;
    TYPE TRec2 IS RECORD(
    NAME VARCHAR2(4000),
    rows TTab1);
    TYPE TTab2 IS TABLE OF TRec2 INDEX BY BINARY_INTEGER;
    TYPE TStrTab IS TABLE OF NUMBER INDEX BY VARCHAR2(256);
    PROCEDURE test_plsql_table(cnt INTEGER);
    PROCEDURE test_str_tab(cnt INTEGER);
    x TTab2;
    empty_tab2 TTab2;
    empty_tab1 TTab1;
    empty_tab0 TTab0;
    str_tab TStrTab;
    empty_str_tab TStrTab;
    END rds_mdt_test;
    CREATE OR REPLACE PACKAGE BODY rds_mdt_test IS
    PROCEDURE test_plsql_table(cnt INTEGER) IS
    BEGIN
    FOR indx1 IN 1 .. cnt LOOP
    FOR indx2 IN 1 .. cnt LOOP
    FOR indx3 IN 1 .. cnt LOOP
    x(indx1) .rows(indx2) .rows(indx3) := indx1;
    END LOOP;
    END LOOP;
    END LOOP;
    x := empty_tab2;
    dbms_session.free_unused_user_memory;
    END;
    PROCEDURE test_str_tab(cnt INTEGER) IS
    BEGIN
    FOR indx IN 1 .. cnt LOOP
    str_tab(indx) := indx;
    END LOOP;
    str_tab := empty_str_tab;
    dbms_session.free_unused_user_memory;
    END;
    END rds_mdt_test;
    1. Running the script
    BEGIN
    rds_mdt_test.test_plsql_table ( 100 );
    END;
    I see that usage of PGA memory in my session is close to zero. So, I can judge that nested PL/SQL table indexed by BINARY_INTEGER and the memory allocated to it were cleaned successfully.
    2. Running the script
    BEGIN
    rds_mdt_test.test_str_tab ( 1000000 );
    END;
    I can see that plain PL/SQL table indexed by VARCHAR2 and memory allocated to it were cleaned also.
    3. Changing the package's type
    TYPE TTab2 IS TABLE OF TRec2 INDEX BY VARCHAR2(256);
    and running the script
    BEGIN
    rds_mdt_test.test_plsql_table ( 100 );
    END;
    I see that my session uses about 62M in PGA. If I run this script twice, the memory usage is doubled and so on.
    The same result I get if I rewrite not highest, but middle PL/SQL type:
    TYPE TTab1 IS TABLE OF TRec1 INDEX BY VARCHAR2(256);
    And only if I change the third, most nested type:
    TYPE TTab0 IS TABLE OF NUMBER INDEX BY VARCHAR2(256);
    I get the desired result -- all memory was returned to OS.
    So, as far as I can judge, in some cases Oracle does not clean complex PL/SQL tables indexed by VARCHAR2.
    Is it true or not? Perhaps there are some features in using such way indexed tables?

  • Wpg_docload.download_file slow (or has a memory leak)

    Hi, (Maybe this should be in the pl/sql forum, but since this is so much used in Apex and I ran into this problem there, I decided to post it here).
    There seems to be a memory leak or some other issue with using wpg_docload.download_file
    I have a couple of pages that show many images (50+, icon sized) . And usually a few days after restarting the Oracle http server, I see the image rendering becoming extremely slow (and usually most images timing out.)
    So in all my procedures using :
    wpg_docload.download_file ( lob_loc );
    I switched it out for :
    declare
    buffer raw ( 32000 );
    buffer_size integer := 32000;
    offset integer := 1;
    begin
    while offset < v_length loop
    dbms_lob.read ( lob_loc, buffer_size, offset, buffer );
    htp.prn ( utl_raw.cast_to_varchar2 ( buffer ) );
    offset := offset + buffer_size;
    end loop;
    end;
    And the speed increase in image loading was phenomenal, I am looking at over 10x speed recieving the image data from the webserver.
    Is there a known bug with wpg_docload.download_file in 10.2.0.2?
    But anyways, if anybody else is running into this slowness, then by all means, try out this workaround.
    Regards
    Oli
    edit:
    There seems to be one other thing that matters in the resulting speed of the image retrieval. I used mod_rewrite to make the images look like /icon/1235.jpg
    and after further testing, this seems to be the catalyst for image retrieval. Not the wpg_docload.download_file
    Message was edited by:
    Oli

    Oli,
    Image retrieval for something.jpg is faster then proc?id=1234That fits in with my theory, browsers often will not rely on a cached version for a URL that contains a parameter (after all, how would the browser know whether the URL is going to return the same data or not even if the parameter is the same?). When you request a particular file (i.e. something.jpg then the browser can use the cache since you have requested a particular file, as opposed to calling a 'procedure/function'.
    This is definetly a browser issue, and it has nothing to do with cacheYou browser has a cache and can use it if it wishes to, so I would still suspect it is related to caching (or lack of caching).
    I would suggest producing the smallest possible test case you can so that the behaviour you describe can be demonstrated.

Maybe you are looking for