Author Topic: Disable WordWrap and Syntax Highlighting on loading bigger files  (Read 745 times)

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 772
  • Karma: +6/-0
    • View Profile
Disable WordWrap and Syntax Highlighting on loading bigger files
« on: February 23, 2009, 01:00:10 pm »
Is there an Option to disable WordWrap and Syntax Highlighting [and more?]
while loading files bigger then xxxxxxxxxx Bytes?

I had load an text file with 1 million lines , 260 MB in size.
This took me 25 seconds because WordWrap was enabled.
If i disable word wrap it took 3 sec. only.

With other editors i have an option to disable formating features if file size is bigger then n byte.
like
<DisableFormatingOnFilesBiggerThenMegaBytes>20</DisableFormatingOnFilesBiggerThenMegaBytes>

The user must enable the formating features he want by hand again, if he want this.
Stefan, HippoEDIT beta tester  (HippoEDIT News On Twitter: http://twitter.com/hippoedit/)

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1666
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: Disable WordWrap and Syntax Highlighting on loading bigger files
« Reply #1 on: February 23, 2009, 04:09:01 pm »
Hello Stefan,

good idea. The problem you have is because I am not overwriting user preferences any more, and you still have word wrap always on for text files (i have reverted it to Off in new installations).
But any way, I think, even if user have it for small files enabled, he would not like this for bigger files.
So I would add xml flag controlling that (do not think that GUI flag necessary), with default for example 2048 kb.

I have done similar optimization already for parsing statistics. It is not done if file is bigger then 2 megs by default, because it used mostly for editing and not used in viewing. This was done to reduce memory consumption.
Disabling of syntax highligthing I dont think woud give some benefits. For txt files it is done only for visible part, so cost nothing. All the rest of functions are done in separated threads, so multi core CPUs should not influence too much.

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
688 Views
Last post March 02, 2009, 03:59:49 pm
by alex
9 Replies
1342 Views
Last post June 05, 2009, 01:53:33 pm
by Stefan
10 Replies
1360 Views
Last post January 21, 2012, 03:21:37 am
by alex
1 Replies
139 Views
Last post June 22, 2011, 02:14:50 am
by alex
5 Replies
67 Views
Last post January 21, 2012, 06:37:41 pm
by alex