Re: ZoneView or ways of dealing with large objects?



Oliver Wong wrote:
I'm also doing a LOT of string manipulation. I'm building a JTextArea object basically one and two characters at a time. So the heap is likely about as full of garbage as it is likely to get.

Are you using the StringBuilder or StringBuffer classes for your string manipulations?


No, thanks for the pointer. I'll look into those. But I'd still like a more scalable solution than relying on memory manipulation.

What happens when I try to display a file that's bigger than main memory + swap file? I plan on doing some heavy graphics work in the future so I'm interested in solutions for very large file sizes.


I thought about asking the JVM to increase it's memory size, but that didn't seem like a scalable solution. Plus I might have to ask users to do the same. So I'm looking for something scalable, something that'll work even when I point it at a 10 Gb file.

Have you considered memory-mapped files?

I'm already using memory mapped files. (Well, one file, the input file, which is the only file I have.)


.



Relevant Pages

  • Re: ZoneView or ways of dealing with large objects?
    ... I'm probably going to implement this manually because I only have one scrollbar to worry about, but I'd like to extend my knowledge of Java so any help you can give would be great. ... I've written Java programs which load text files in the hundreds of megabytes into memory without too much trouble ... Are you using the StringBuilder or StringBuffer classes for your string manipulations? ... didn't seem like a scalable solution. ...
    (comp.lang.java.help)
  • Re: out of Memory exception
    ... StringBuilder when dealing with 130mb file. ... memory for two reasons... ... I'm using a FileStream and StreamReader to read ... > size - that way it won't need to keep building up bigger buffers. ...
    (microsoft.public.dotnet.framework)
  • Re: XmlTextWriter Speed Increase?
    ... StringBuilder sb = new StringBuilder); ... If it still report OOM exception, that means your system memory ... And for the file based approach, if you want improve the cache size and how ... Subject: XmlTextWriter Speed Increase? ...
    (microsoft.public.dotnet.framework)
  • Re: XmlTextWriter Speed Increase?
    ... What if you reuse the buffer rather than creating a new one each time? ... StringBuilder sb = new StringBuilder); ... If it still report OOM exception, that means your system memory ... Subject: XmlTextWriter Speed Increase? ...
    (microsoft.public.dotnet.framework)
  • Re: StringBuilder vs. String performance
    ... StringBuilder instead" has been due to someone complaining about speed, ... In my experience at least, I have seen more benefit in saving memory, ... Optimization is optimization, and both speed and memory should be watched at ...
    (microsoft.public.dotnet.languages.csharp)

Loading