[Geany-devel] editing big files can be too slow with tag reparsing

Nick Treleaven nick.treleaven at xxxxx
Wed Sep 28 11:03:41 UTC 2011

On 28/09/2011 00:45, Lex Trotman wrote:
> Nick, Thomas,
> [...]
>>> 0001-Per-document-real-time-symbols-setting.patch:
>>> Adds a per-document setting for real-time updates and a menu item in the
>>> Document menu.  There is still a FIXME in it, feel free to give ideas :)
> @Nick, there are lots of large generated files a programmer might want
> to check, especially XMLs and logs, saying there is an xxxGb maximum
> is wrong, it depends on the machine the user has.  Forcing them to
> have to go use another editor or to not have highlighting is bad.

You edited out my reply which addressed that:

On 27/09/2011 17:17, Nick Treleaven wrote:
 > 1. Very big files > x MB - I don't think we need to support that case
 > specially, Geany is a programmer's editor. The user can just open as
 > filetype none if they only want basic editing.

In the open dialog, choose filetype None and you can easily open big 
files, plus it will be faster as syntax highlighting won't be enabled.

> @Thomas, and since the problem is with a specific large file, Colomban
> is right it is per document, since you only need to turn off the one
> that is too large.
> @Nick, therefore not per filetype either

For large files an auto-disable reparsing feature would work fine.

>>> 0002-Tell-the-user-if-real-time-reparsing-is-slow-and-let.patch:
>>> This one adds the check for the updating duration and asks the user.  It
>>> is WIP, and I'm not really convinced by the dialog, as you can read in a
>>> TODO.  Apart that, it seems to work pretty OK.
>> This is more what I meant. I'm not so sure an extra dialog is needed, but if
>> people want one that's ok. Would a "don't ask me again" checkbox be a good
>> idea (if it doesn't already).
> @Thomas, While I still think automatic changing of settings is a last
> resort, and as Nick said what performance number is acceptable? If we
> do add it, the user must be notified, but a "don't tell me again" is
> ok (for the session)

Perhaps I was wrong with 0.2s, maybe 0.5s (I didn't check Colomban's 
code to see what he used).

> @Nick no one reads the status bar, sadly

A dialog is too intrusive. Consider opening 10 slow files and having to 
click the dialog for each one. Status bar is fine - as you sometimes say 
programmers don't need to be treated like newbies. Not having tag 
reparsing enabled will mean a few invalid bug reports at worst.

More information about the Devel mailing list