Big report problems (Large/1000 pages)

  • 1.
    I produced an rtf report using another program we wrote. The report was about 240 pages long and the output to a file (test.rtf) was about 1.5MBytes. However, when we loaded it into a WPRichText box, the amount of memory used by our software jumped from about 10Mb to 100Mb.
    I then saved the WPRichText contents - I knew it would be bigger than it started because of the inefficient way WP seems to handle rtf tags - and the exported size of the report was 4.9Mb.

    Quite why the WPTools component uses so much memory to show
    the rtf report is not clear, or why it has to be so large when saved, I don't know.

    2.
    I repeated the test with an RTF file which was initially 4mb (generated by some other software). Our program with WPRichText in tried to load the 4mb file (full of tables) but ultimately failed - its memory usage jumped rather randomly between 100Mb and 200Mb. I gave up waiting after a few minutes and killed the program.

    Any ideas how we can handle big reports any better?

    Is there a way to stop WPtools trying to load in the whole file into memory? Can't it leave it in the disk file and page-load it is/stream etc.?

    Will the functions: wprichtext.LoadFlowTextFromStream or LoadFromStreamWithReader help?