[Geany] do not open oversize files

Krzysztof Żelechowski giecrilj at xxxxx
Tue Jan 4 09:31:36 UTC 2011


Dnia wtorek, 4 stycznia 2011 o 08:29:15 Lex Trotman napisał(a):
> 2011/1/3 Krzysztof Żelechowski <giecrilj at stegny.2a.pl>:
> > Geany should not try to open oversize files it is unable to digest.
> >
> > <URL: http://is.gd/jZn5B >
> >
> > The result is infinite thrashing and system unresponsive; the Process
> > Monitor shows geany at 600MB swapped out.
> 
> How big is your file and how big is your memory?

My file is 1.3 GB and my memory is 1 GB.

> 
> Scintilla IIRC uses about 2*memory for buffering, so Geany needs that too.
> 
> Unfortunately there is no way of knowing how much memory is available,
> the requests for such information just return infinite (at least on my
> system) so there is no way for Geany/Scintilla to limit the usage.

One cannot inquire for available memory but one can inquire for Physical RAM.  If file size is greater than 2 * RAM, ask the operator.

> >
> > (The less tool has no problem with displaying this file.)
> 
> Less does not buffer the file, it reads line by line and prints it,
> but you can't do that with an editor.

Of course, there is no editor that can edit any file.  
I suggest that Geany acknowledge that and do not try to edit a file it is uncapable of handling.

Cheers,
Chris



More information about the Users mailing list