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.
(The less tool has no problem with displaying this file.)
2011/1/3 Krzysztof Żelechowski giecrilj@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?
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.
(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.
Cheers Lex
Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
On 1/4/11, Lex Trotman elextr@gmail.com wrote:
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.
Maybe if Geany would give a warning like:
"You're trying to open a huge file (600MB), which may cause your system to work slow. Are you sure?"
Am 04.01.2011 09:56, schrieb Milan Babuskov:
On 1/4/11, Lex Trotman elextr@gmail.com wrote:
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.
Maybe if Geany would give a warning like:
"You're trying to open a huge file (600MB), which may cause your system to work slow. Are you sure?"
Well, where to set such a point? E.g. if you have an XML-file the lexxer is needing much more memory than a C or a key-value-file would need. Also is this depending on user's system.
Cheers, Frank
On Tue, Jan 4, 2011 at 11:01 AM, Frank Lanitz frank@frank.uvena.de wrote:
Am 04.01.2011 09:56, schrieb Milan Babuskov:
On 1/4/11, Lex Trotman elextr@gmail.com wrote:
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.
Maybe if Geany would give a warning like:
"You're trying to open a huge file (600MB), which may cause your system to work slow. Are you sure?"
Well, where to set such a point?
Any file larger than 50MB?
Alternatively, if the file browser would show the file sizes that would also work. It happens to me sometimes to accidentally open the wrong file and thus lock up the system.
On Tue, 4 Jan 2011 14:05:36 +0100 Milan Babuskov milan.babuskov@gmail.com wrote:
"You're trying to open a huge file (600MB), which may cause your system to work slow. Are you sure?"
Well, where to set such a point?
Any file larger than 50MB?
This sounds OK, or even smaller. A hidden pref could be used to control the limit.
Alternatively, if the file browser would show the file sizes that would also work. It happens to me sometimes to accidentally open the wrong file and thus lock up the system.
Changing the GTK file browser is beyond our control, but I agree that would be useful.
Regards, Nick
On Tue, Jan 4, 2011 at 6:42 PM, Nick Treleaven nick.treleaven@btinternet.com wrote:
Alternatively, if the file browser would show the file sizes that would also work. It happens to me sometimes to accidentally open the wrong file and thus lock up the system.
Changing the GTK file browser is beyond our control, but I agree that would be useful.
Actually, I rarely use the system file browser. I meant Geany's intergrated file browser, as seen on this screenshot:
http://www.guacosoft.com/geany.png
Although, Geany users with smaller screens might object to this, because there isn't much space available in that window anyway. Maybe a messagebox is better idea.
Thanks,
On Tue, 4 Jan 2011 18:54:33 +0100 Milan Babuskov milan.babuskov@gmail.com wrote:
Actually, I rarely use the system file browser. I meant Geany's intergrated file browser, as seen on this screenshot:
Ok, I misunderstood.
Although, Geany users with smaller screens might object to this, because there isn't much space available in that window anyway. Maybe a messagebox is better idea.
I think the messagebox would be useful anyway as files can be opened in various other ways.
The file browser panel could be changed to show the correct icon for each file, that might help avoid your problem. There might be a performance penalty, but that would be a better use of space than adding file sizes IMO.
Regards, Nick
On Tue, Jan 4, 2011 at 7:18 PM, Nick Treleaven nick.treleaven@btinternet.com wrote:
The file browser panel could be changed to show the correct icon for each file, that might help avoid your problem. There might be a performance penalty, but that would be a better use of space than adding file sizes IMO.
Maybe the browser should be left as it is now. Most of the time when I had this big-file problem, the file was named either .txt or .xml, so icon would not help. Best to pop-up a message box and the the user decide.
Regards,
On Tue, 4 Jan 2011 17:42:22 +0000 Nick Treleaven nick.treleaven@btinternet.com wrote:
Alternatively, if the file browser would show the file sizes that would also work. It happens to me sometimes to accidentally open the wrong file and thus lock up the system.
Changing the GTK file browser is beyond our control, but I agree that would be useful.
Huh? Right-click on the file list and check "Show size column". Don't know the minimum gtk+ version though.
On Tue, 4 Jan 2011 20:08:48 +0200 Dimitar Zhekov dimitar.zhekov@gmail.com wrote:
Alternatively, if the file browser would show the file sizes that would also work. It happens to me sometimes to accidentally open the wrong file and thus lock up the system.
Changing the GTK file browser is beyond our control, but I agree that would be useful.
Huh? Right-click on the file list and check "Show size column". Don't know the minimum gtk+ version though.
Interesting to know, but doesn't work on my older GTK.
Regards, Nick
On Tue, 4 Jan 2011 18:15:22 +0000, Nick wrote:
On Tue, 4 Jan 2011 20:08:48 +0200 Dimitar Zhekov dimitar.zhekov@gmail.com wrote:
Alternatively, if the file browser would show the file sizes that would also work. It happens to me sometimes to accidentally open the wrong file and thus lock up the system.
Changing the GTK file browser is beyond our control, but I agree that would be useful.
Huh? Right-click on the file list and check "Show size column". Don't know the minimum gtk+ version though.
Interesting to know, but doesn't work on my older GTK.
See attached screenshot.
IIRC it came with GTK 2.14 or 2.16.
Regards, Enrico
On Tue, 4 Jan 2011 17:42:22 +0000, Nick wrote:
On Tue, 4 Jan 2011 14:05:36 +0100 Milan Babuskov milan.babuskov@gmail.com wrote:
"You're trying to open a huge file (600MB), which may cause your system to work slow. Are you sure?"
Well, where to set such a point?
Any file larger than 50MB?
This sounds OK, or even smaller. A hidden pref could be used to control the limit.
That's probably the best with using a hidden pref.
Alternatively, if the file browser would show the file sizes that would also work. It happens to me sometimes to accidentally open the
If adding this to the file browser plugin, it should be optional as it would cause a not so small performance loss stat'ing each single file or even use GIO for querying the file size which might be a bit more portable.
Regards, Enrico
On Tue, 04 Jan 2011 11:01:44 +0100 Frank Lanitz frank@frank.uvena.de wrote:
On 1/4/11, Lex Trotman elextr@gmail.com wrote:
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) [...]
Maybe if Geany would give a warning like:
"You're trying to open a huge file (600MB), which may cause your system to work slow. Are you sure?"
Well, where to set such a point? E.g. if you have an XML-file the lexxer is needing much more memory than a C or a key-value-file would need. Also is this depending on user's system.
As a crude estimate, under Linux you can try to malloc(minimal presumable required memory). It won't be actually allocated, unless you memset() it or something, but if the result is NULL, a warning is justified.
Dnia wtorek, 4 stycznia 2011 o 18:22:42 Dimitar Zhekov napisał(a):
As a crude estimate, under Linux you can try to malloc(minimal presumable required memory). It won't be actually allocated, unless you memset() it or something, but if the result is NULL, a warning is justified.
I do not know where you got it from, but the last OS I know that behaved like that was MacOS 7. Please do not spread misinformation.
malloc fails at 01 << 040 at my place.
(Actually, it means that the declarations of malloc and mmap in glibc would do with unsigned int as well; you have to use mmap64 to allocate larger blocks).
Best, Chris
Dnia wtorek, 4 stycznia 2011 o 08:29:15 Lex Trotman napisał(a):
2011/1/3 Krzysztof Żelechowski giecrilj@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
Hi,
Am 04.01.2011 10:31, schrieb Krzysztof Żelechowski:
Dnia wtorek, 4 stycznia 2011 o 08:29:15 Lex Trotman napisał(a):
2011/1/3 Krzysztof Żelechowski giecrilj@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.
Wow.
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.
I think this will cause even more confusing than a slow running Geany on a swapping system. Not every system does have a swap at all or at least one which is twice as RAM-size. Also I could imagine not all system does have a trust able syscall to figure out the physical memory.-
(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.
I don't see any valid algorithm to figure out whether Geany can do or not. BTW: vim is able to do a more line based processing. At least a fan of vim tried to told me some time ago. Of course,k I didn't believe him as Geany and Emacs is much more cooler :D
Cheers, Frank
Dnia wtorek, 4 stycznia 2011 o 11:05:47 Frank Lanitz napisał(a):
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.
I think this will cause even more confusing than a slow running Geany on a swapping system. Not every system does have a swap at all or at least one which is twice as RAM-size. Also I could imagine not all system does have a trust able syscall to figure out the physical memory.-
I obviously meant RAM / 2, sorry. Most systems support querying the amount of physical memory. Regarding the system that do not, well, let them hang…
Chris
On Tue, 4 Jan 2011, Krzysztof Żelechowski wrote:
Dnia wtorek, 4 stycznia 2011 o 11:05:47 Frank Lanitz napisał(a):
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.
I think this will cause even more confusing than a slow running Geany on a swapping system. Not every system does have a swap at all or at least one which is twice as RAM-size. Also I could imagine not all system does have a trust able syscall to figure out the physical memory.-
I obviously meant RAM / 2, sorry. Most systems support querying the amount of physical memory. Regarding the system that do not, well, let them hang…
Can emacs load your file? Try it and get back to us...