Memory usage of ApplyLogOnInfo and TestConnectivity

Hi,
Our application is coded in C++ (VS 2005)  and we access the Crystal Report 2008 API using .NET (CR 2008 SP1). In the application, when a report needs to be printed, it will
        Load the report
        Login to the database
        Set the parameters
        Print the report
        Close the report
        Perform garbage collection
One of our customers has a very large report (.rpt > 2 M), which has many subreports and each subreport accesses a number tables.While observing the memory usage from Task Manager on win 2008, I can see loading the report self eats up about 100 M, then Login to the database will consume another 400 M, when the Report is closed, the memoary drops back a little bit and stays at around 500 M. Re-run the same report again, the memory will go up by another 200 M mainly during the login step. Then it stays at around 700 M for subsequent printing requests.
For reports which are small (< 100 k) and do not have a lot of subreports, the memory usage will be around 150 M. I am wondering why the login step will use some much memory and they do not get freed up when the report is close for the second report request.
The following is the code for the login step:
void CRptWriterIntf::SetDBConnectionInfo()
     m_TableLogOnInfo = gcnew TableLogOnInfo;
     m_TableLogOnInfo->ConnectionInfo->DatabaseName = gcnew System::String(m_serverName.getBuffer());
     m_TableLogOnInfo->ConnectionInfo->ServerName = gcnew System::String(m_dbName.getBuffer());
     m_TableLogOnInfo->ConnectionInfo->UserID = gcnew System::String(m_dbUser.getBuffer());
     m_TableLogOnInfo->ConnectionInfo->Password = gcnew System::String(m_dbPass.getBuffer());
void CRptWriterIntf::ReportLogon(ReportDocument^ reportDocument)
     SetReportLogonInfo(reportDocument);
     for (int i=0; i < reportDocument->Subreports->Count; i++)
             ReportDocument^ subReport = reportDocument->Subreports<i>;
             SetReportLogonInfo(subReport);
void CRptWriterIntf::
SetReportLogonInfo( ReportDocument^ reportDocument)
    for (int i=0; i < reportDocument->Database->Tables->Count; i++)
        Table^ table = reportDocument->Database->Tables<i>;
        table->ApplyLogOnInfo(m_TableLogOnInfo);
        if (!table->TestConnectivity())
            LOG_ERROR();
            CleanEngine(reportDocument);
            throw e;
Thanks
Kin H Chan

Thank you for the suggestion.
I updated my Crystal Report 2008 to SP4, but that does not seem to make any difference in term of the memory usage.
I do not find any function to close the DB connection from the Crystal Report 2008 .NET API Reference. Am I missing something?
The Depose method is a protected method which I cannot access directly from the ReportDocument object. Instead, it will be called in the destructor of ReportDocument according to the documentation.
In my codes, after the report is generated, I always perform:
Close the report by:
     reportDocument->Close()
and
Perform garbage collection
     System::GC::Collect();
If I skip either one of the two calls below, the report will fail to access the db from the report
     table->ApplyLogOnInfo(m_TableLogOnInfo);
     if (!table->TestConnectivity())
That is the reason that I have them there. Are there alternative to this approach?
By the way, how can I attach file (e.g. screen shots, sample codes, sample reports) to my question?
Thanks
Kin H Chan

Similar Messages

  • Norton reports high memory usage with firefox and it crashes often

    Norton antivirus 2011 has pop up warnings reporting high memory usage from Firefox. I have been getting theem often and my computer is crashing often after those pop up warnings. Thanks

    Safe mode did not help.
    I have disabled ALL extensions and plug-ins, but the problem with "zig-zag" memory usage still remains (I've not tried to leave browser open for the night yet).
    I think I'll do clean reinstall with completely new empty profile (without sync'ed information) to try this out. If this works, I'll start adding stuff (configuration, sync, features, etc) to see what causes the problem.

  • Memory usage gets high and stays high

    I'll use my current project as an example, but I've been noticing this issue ever since I started monitoring my computer's memory usage. If I have an hour long Premiere CC timeline and render it, during rendering my computer's memory will go up to about 90%. After rendering is done, task manager shows that Premiere is still using about the same amount of memory, and it stays that way until I restart my computer. It's like it has locked into using certain resources and cannot let go. Any way to remedy this? I currently have 10gb memory (ordered 2gb more that is arriving this week), so it's not the fastest machine around, but should handle memory better in my opinion. I am fine with the rendering speed itself, it's just the tied up resources afterwards that seem like it could be fixed.
    One more point - one solution is forcing Premiere and all its components to close. This gets the memory back to normal. Unfortunately, sometimes after I render a long timeline and force restart Premiere, when I get back all my render files don't properly reconnect and I'm forced to re-render the timeline. The fact that it doesn't reconnect to the render files is another related-issue I need help with too, if anyone can offer feedback. Thanks!

    On the lost renders.
    http://forums.adobe.com/thread/1144624?tstart=30
    On the memory issue, I'm not sure anything is wrong here.  You say PP releases it when you close PP.  That's the expected behavior.

  • Installed 5.0 now my memory usage is high and computer is slow. how do i correct this?

    my cpu usage keeps popping up and saying firefox memory usa isge is at 73%. then my computer runs slow. i did not have this problem with my last version of firefox. also usage from plug in container is high. how do i correct this?

    Credit Tony E:
    To downgrade to Firefox 3.6 first uninstall Firefox 4, but do not select the option to "Remove my Firefox personal data". If you select that option it will delete your bookmarks, passwords and other user data. See https://support.mozilla.com/kb/Uninstalling+Firefox
    You can then install the latest version of Firefox 3.6 available from http://www.mozilla.com/en-US/firefox/all-older.html - it will automatically use
    your current bookmarks, passwords etc.
    To avoid possible problems with downgrading, I recommend going to your profile folder and deleting the following files if they exist - extensions.cache, extensions.rdf, extensions.ini, extensions.sqlite and localstore.rdf. Deleting these files will force Firefox to rebuild the list of
    installed extensions, checking their compatibility, and reset toolbar customizations.
    For details of how to find your profile folder see https://support.mozilla.com/kb/Profiles

  • My iphone has no pictures on it and my memory usage from photo library is 6.2 Gigs.  How can I reset and get back this lost memory?

    After resetting my phone, I re-installed apps and connected to my computer.  I made sure I didn't sync any pictures.  My iphone has no pictures on it, yet the memory usage on itunes AND the phone tells me that the iphoto database is taking 6.2 Gigs.  Is there a way to zero that and regain that memory?

    I already tried to factory default the phone and restored it.  Same problem.... I have no photo's on my phone and still have 6.2 Gigs memory being used....  Pls help.

  • 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...

  • Tracking Memory usage on iOS using the Stats class

    I've been checking memory usage on an app I'm developing for iOS using the Stats class https://github.com/mrdoob/Hi-ReS-Stats ( http://help.adobe.com/en_US/as3/mobile/WS4bebcd66a74275c3-315cd077124319488fd-7fff.html#WS 948100b6829bd5a61637f0a412623fd0543-8000).
    I added the Stats class to my project and redeployed and, yikes, memory usage reported in Stats creeps up (pretty slowly) even when there's nothing happening in the app (just showing a loaded bitmap).
    To try and track down the issue I created a project with a test class that extends Sprite with just this single call in the constructor :-
    addChild( new Stats() );
    I deployed it to the device to check that it didn't gobble any memory.
    But I was Suprised to watch the memory usage creep up and up (to approx 5) before some garbage collection kicked in and takes memory back down. I left it running and then it crept up again to over 7.5 this time before being kicked back down to just below 3.
    So 2 related questions that I'd appreciate any feedback/observations/thoughts on :-
    1 - Is this normal (i.e. memory creeping up when there's nothing other than Stats in the project) ?
    2 - What is the best way to monitor memory usage within an app ? Is Stats good enough - is Stats itself causing the memory usage ?
    All the best guys !

    Also see thread (http://forums.adobe.com/message/4280020#4280020)
    My conclusions are :-
    - If you run an app and leave it idle, memory usage gradually creeps up (presumably as memory is being used to perform calcs/refresh the display etc)
    - Periodically the garbage collection kicks in and memory is brought back down
    - This cycle could be in excess of 5 mins
    Run with your real app and memory will increase and be released much more rapidly/regularly.
    - It's probably worth performing initial checks by running on your desktop to iron out any initial problems

  • High memory usage OSX Lion on iMac

    Hi,
    Recently upgraded 2006 iMac 6.1 to OSX 10.7.2 (4GB). Noticed performance dropped significantly when 2 or more users are logged in especially when switching users. Observed memory usage for OSX Lion is far higher than Snow Leopard! By startup 2GB real memory already allocated and often down to last 500MB. Performance appear to slow down due to swapping as swap i/o appears to increase.
    On snow leopard I had 6 users logged in and 4GB was plenty. Lion appears to be a MS product!!!!
    Anyone else experienced high memory usage on Lion and any ideas how to reduce memory consumption?
    Unfortunately at the maximum memory capacity for my my iMac so need to find ways to reduce memory usage. There must be a kernel compiler option that could reduce memory.....
    Also considering SSD drive to speed up swap i/o read/writes.
    Otherwise will have to go back to leopard :-(
    Thanks for any help in advance.
    -Dav
    PS> OSX Lion is alot more stable than previous OSX releases with this iMac model. Especially iMacs suffering the notorious NVDIDIA GPU heat problems...

    You mac can handle up to 3gb of ram, but slightly more will be available with 4gb installed.  For Lion to run smooth, a true 4gb of ram is preferred, which may explain the sluggishness of your mac.

  • Internet Explorer - Memory Usage

    Hi,
    I have developed a VC model and deployed it in the portal. When i execute the model in internet explorer 7 or 6, the memory usage keeps building up and does not drop even after getting all the data. I have got couple of popup iviews in the model which when executed increases the memory usage further more and eventually internet explorer stops responding.
    Currently the only way to clear the memory is to close the Internet explorer window. Is there any other way to flush out the memory after the data has been retrieved from the back-end.
    Regards,
    Ravi.

    Hi Ravi,
    I googled in and found few links which can be helpful to you.
    http://cybernetnews.com/browser-comparison-internet-explorer-firefox-chrome-safari-opera/ - which is all abut the memory tests which were conducted for various browsers including ie regarding the usage of memory.
    http://www.bigresource.com/PHP-Flush-clearing-buffer-3rXPLSop.html
    http://www.wimpyplayer.com/docs/howto/clear_cache.html - which tells about the way to flush out the browser memory for better usage.
    With Regards,
    Vipin Vijayan.

  • Memory Efficiency of BufferedImage and ImageIO

    This thread discusses the memory efficiency of BufferedImage and ImageIO. I also like to know whether if there's possible memory leak in BufferedImage / ImageIO, or just that the result matches the specifications. Any comments are welcomed.
    My project uses a servlet to create appropriate image tiles (in PNG format) that fits the specification of google map, from images stored in a database. But it only takes a few images to make the system out of heap memory. Increasing the initial heap memory just delays the problem. So it is not acceptable.
    To understand why that happens, I write a simple code to check the memory usage of BufferedImage and ImageIO. The code simply keeps making byte arrays from the same image until it is running out of the heap memory.
    Below shows how many byte arrays it can create:
    1M jpeg picture (2560*1920):
    jpeg = 123
    png = 3
    318K png picture (1000*900):
    jpeg = 1420
    png = 178
    Notice that the program runs out of memory with only 3 PNG byte arrays for the first picture!!!! Is this normal???
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import java.awt.geom.*;
    import javax.imageio.*;
    import java.io.*;
    import javax.swing.*;
    import java.util.*;
    public class Test {
         public static void main(String[] args) {
              Collection images = new ArrayList();
              for (;;) {
                   try {
                        BufferedImage img = ImageIO.read(new File("PTHNWIDE.png"));
                        img.flush();
                        ByteArrayOutputStream out =
                             new ByteArrayOutputStream();
                        ImageIO.write(img, "png", out); // change to "jpeg" for jpeg
                        images.add(out.toByteArray());
                        out.close();
                   } catch (OutOfMemoryError ome) {
                        System.err.println(images.size());
                        throw ome;
                   } catch (Exception exc) {
                        exc.printStackTrace();
                        System.err.println(images.size());
    }

    a_silent_lamb wrote:
    1. For the testing program, I just use the default VM setting, ie. 64M memory so it can run out faster. For server, the memory would be at least 256M.You might want to increase the heap size.
    2. Do you mean it's 2560*1920*24bits when loaded? Of course.
    That's pretty (too) large for my server usage, Well you have lots of image data
    because it will need to process large dimension pictures (splitting each into set of 256*256 images). Anyway to be more efficient?Sure, use less colors :)

  • How to check memory usage of a debug

    I am very new, sorry for any newbishness on my part.
    Is there a way to track how much memory your debug is using?  I am trying to make a game, and I have 2 ways of doing something.
    One with an array of square objects doing hitTest, and one only 1 object and an array of cords doing a nested if{}.
    I want to see what each of these are doing in terms of memory usage during runtime and which one would be better.
    (added)
    Specificly not just which one of these is better, but also as different things are applied, I want to test how each of these things responds and which one would slow down a computer less.  And later on as things progress I want a way to test it.

    Hi there
    What Adobe product are you using? What you need to do is click the link below and locate the forum that is specific to the product you are using. Then re-post your question there.
    What you have done is the equivalent of wandering into a hospital and saying you feel ill. Where exactly do you feel ill? You may need a foot specialist, a heart specialist, a brain specialist, etc.
    Click here to visit the main forums chooser page
    Cheers... Rick

  • Problem with Firefox and very heavy memory usage

    For several releases now, Firefox has been particularly heavy on memory usage. With its most recent version, with a single browser instance and only one tab, Firefox consumes more memory that any other application running on my Windows PC. The memory footprint grows significantly as I open additional tabs, getting to almost 1GB when there are 7 or 8 tabs open. This is as true with no extensions or pluggins, and with the usual set, (firebug, fire cookie, fireshot, XMarks). Right now, with 2 tabs, the memory is at 217,128K and climbing, CPU is between 0.2 and 1.5%.
    I have read dozens of threads providing "helpful" suggestions, and tried any that seem reasonable. But like most others who experience Firebug's memory problems, none address the issue.
    Firefox is an excellent tool for web developers, and I rely on it heavily, but have now resorted to using Chrome as the default and only open Firefox when I must, in order to test or debug a page.
    Is there no hope of resolving this problem? So far, from responses to other similar threads, the response has been to deny any responsibility and blame extensions and/or pluggins. This is not helpful and not accurate. Will Firefox accept ownership for this problem and try to address it properly, or must we continue to suffer for your failings?

    55%, it's still 1.6Gb....there shouldn't be a problem scanning something that it says will take up 300Mb, then actually only takes up 70Mb.
    And not wrong, it obviously isn't releasing the memory when other applications need it because it doesn't, I have to close PS before it will release it. Yes, it probably is supposed to release it, but it isn't.
    Thank you for your answer (even if it did appear to me to be a bit rude/shouty, perhaps something more polite than "Wrong!" next time) but I'm sitting at my computer, and I can see what is using how much memory and when, you can't.

  • Problem with scanning and memory usage

    I'm running PS CS3 on Vista Home Premium, 1.86Ghz Intel core 2 processor, and 4GB RAM.
    I realise Vista only sees 3.3GB of this RAM, and I know Vista uses about 1GB all the time.
    Question:
    While running PS, and only PS, with no files open, I have 2GB of RAM, why will PS not let me scan a file that it says will take up 300Mb?
    200Mb is about the limit that it will let me scan, but even then, the actual end product ends up being less than 100Mb. (around 70mb in most cases)I'm using a Dell AIO A920, latest drivers etc, and PS is set to use all avaliable RAM.
    Not only will it not let me scan, once a file I've opened has used up "x" amount of RAM, even if I then close that file, "x" amount of RAM will STILL be unavaliable. This means if I scan something, I have to save it, close PS, then open it again before I can scan anything else.
    Surely this isn't normal. Or am I being stupid and missing something obvious?
    I've also monitored the memory usage during scanning using task manager and various other things, it hardly goes up at all, then shoots up to 70-80% once the 70ishMb file is loaded. Something is up because if that were true, I'd actually only have 1Gb of RAM, and running Vista would be nearly impossible.
    It's not a Vista thing either as I had this problem when I had XP. In fact it was worse then, I could hardly scan anything, had to be very low resolution.
    Thanks in advance for any help

    55%, it's still 1.6Gb....there shouldn't be a problem scanning something that it says will take up 300Mb, then actually only takes up 70Mb.
    And not wrong, it obviously isn't releasing the memory when other applications need it because it doesn't, I have to close PS before it will release it. Yes, it probably is supposed to release it, but it isn't.
    Thank you for your answer (even if it did appear to me to be a bit rude/shouty, perhaps something more polite than "Wrong!" next time) but I'm sitting at my computer, and I can see what is using how much memory and when, you can't.

  • Problem with JTree and memory usage

    I have problem with the JTree when memory usage is over the phisical memory( I have 512MB).
    I use JTree to display very large data about structure organization of big company. It is working fine until memory usage is over the phisical memory - then some of nodes are not visible.
    I hope somebody has an idea about this problem.

    55%, it's still 1.6Gb....there shouldn't be a problem scanning something that it says will take up 300Mb, then actually only takes up 70Mb.
    And not wrong, it obviously isn't releasing the memory when other applications need it because it doesn't, I have to close PS before it will release it. Yes, it probably is supposed to release it, but it isn't.
    Thank you for your answer (even if it did appear to me to be a bit rude/shouty, perhaps something more polite than "Wrong!" next time) but I'm sitting at my computer, and I can see what is using how much memory and when, you can't.

  • High memory usage when many tabs are open (and closed)

    When I open Firefox the memory usage is about 70-100 MB RAM. When I'm working with Firefox I often open 15-20 tabs at once, then I close them and open others. Memory usage increaes up to 450 - 500 MB RAM. After closing the tabs the usage usually decreases, but after sometime. It starts decreasing very slow and never comes back to the level from the beginning. After few hours of work Firefox uses about 400 MB RAM even if one tab is open. First I thought it's because of my plugins (Firebug, Speed Dial, Adlock Plus) but I've checked it and it's not. I reinstalled Firefox but the problem occurs as well. I'm not sure if it's normal. Could you help me, please?

    Hi,
    Not an exact answer but please [http://kb.mozillazine.org/Reducing_memory_usage_(Firefox) see this.] The KB article ponders through various general situations which may or may not be applicable to specific instances but nevertheless could be helpful.
    Useful links:
    [https://support.mozilla.com/en-US/kb/Options%20window All about Tools > Options]
    [http://kb.mozillazine.org/About:config Going beyond Tools > Options - about:config]
    [http://kb.mozillazine.org/About:config_entries about:config Entries]
    [https://addons.mozilla.org/en-US/firefox/addon/whats-that-preference/ What's That Preference? add-on] - Quickly decode about:config entries - After installation, go inside about:config, right-click any preference, enable (tick) MozillaZine Results to Panel and again right-click a pref and choose MozillaZine Reference to begin with.
    [https://support.mozilla.com/en-US/kb/Keyboard%20shortcuts Keyboard Shortcuts]
    [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder & Files]
    [https://support.mozilla.com/en-US/kb/Safe%20Mode Safe Mode]
    [http://kb.mozillazine.org/Problematic_extensions Problematic Extensions/Add-ons]
    [https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes Troubleshooting Extensions and Themes]

Maybe you are looking for

  • How are you currently using video with marketing automation?

    I manage an educational site through Brightcove called Video Marketing Academy. I would like to create a course to tackle the challenges of using video with a marketing automation platform. I'd love to know how you are currently using video with mark

  • Automatic Credit Check- Credit active field in Item Category

    Hi All, In the current system, simple credit check is active and now the customer would like to consider the open sales order and delivery documents as well. Hence we are activating automatic credit check. The issue I am facing here is the credit act

  • By default first tab should open, when user clicks on the Open popup.

    Hi Team, I am working on Jdev11g. I am facing problem to Open Fisrt tab from popup when i revisite to it irrespective of the Tab which was earlier selected while closing the popup. Currently i am populating one list for records in ADF table and in fi

  • Doubt in reporting

    I have a reporting requirement in which I have to calculate the number of days. The requirement is something like this: A person receives his promotion on 01/20/2006 so when user pulls the report he wants to see how long that person has been in that

  • Help: Can't import old imovies from external drive unless I save on iMac

    Forgive me, I have read the similar questions in this forum, but I still need help. I made a great number of movies using the old imovie HD, and then saved all of them on my external hard drive. When I open up imovie 08 and look at the event library,