Join  |  Sign in
Very Large Files (100mb+)

24-Oct-2017 11:00 AM

Scott Myers

Scott Myers

Posts: 6

I have found that, when using the SyntaxEdit control to display a very large file (100mb+), enabling word wrap takes an extremely long time. Scrolling to the end of the file as well.

The SyntaxEdit control is read-only.

The only text that would require wrapping would be the text currently visible but the behavior I am seeing seems to indicate that it wraps the entire file contents.

Also, any tips how to show very large files to minimize the overhead in the SyntaxEdit control?

Thanks for any help you can provide.
  Reply

24-Oct-2017 01:58 PM

Scott Myers

Scott Myers

Posts: 6

As  test, I loaded a 105mb log file that had 41k lines in it. I then scrolled to the bottom and enabled Word Wrap.

The SyntaxEdit control has been working on turning on word wrap for an hour and a half and shows no sign of getting close.

If you want, I can send you a zip file containing the log file and you can try for yourself. I looked for a sample program in the Alternet folder (to see if the sample program exhibited the same behavior) but did not find one.

Please let me know if you have any questions or would like a copy of the file I am using. Thanks.

Scott
  Reply

24-Oct-2017 04:51 PM

Andrew Medvedev

Andrew Medvedev

Posts: 49

Hi Scott,

If wordwrap is turned on, SyntaxEdit control should only wrap lines up until the visible area (plus some more), however if you scroll down to the end, it does need to word wrap all lines.
Which means that effect of the wordwrap at the bottom of a large file is more noticeable than on the top of it.

Having said that, taking more than 1 hour for 40K lines is definitely not acceptable.

All Alternet demos are located in 
Users\Public\Documents\AlterNET Software\Extensibility Studio 2.0\Bin
and should be accessible via Demo Explorer desktop shortcut.

I tried WordWrap demo and loaded SyntaxEdit.cs in it (10K lines) in WordWrap mode, and for me navigating to the end and resizing control works pretty fast, so yes, please send me (andrew.medvedev@alternetsoft.com) a log file for us to reproduce the problem. Please also let me know if you this slow behaviour can be reproduced with our demos, or happens only in your project with some specific settings.

regards,
Andrew
  Reply

25-Oct-2017 03:16 AM

Scott Myers

Scott Myers

Posts: 6

Hi Andrew,

I tried loading the 105MB log file in the Main Alternet Demo, scrolled to the bottom and enabled word wrap. It has been at it for over 30 minutes now.

I emailed you a zip file with the log file I am using.

At first, I tried using the Syntax demo but could not get it to compile. It looked like it was referencing the Alternet control 1.0.0 suite. I only have 2.0. installed here (since you can only have one version installed at a time).

You might want to check the demos that are distributed with 2.0 and make sure that they all reference the 2.0 controls.

Thanks.

Scott
  Reply

26-Oct-2017 12:06 AM

Andrew Medvedev

Andrew Medvedev

Posts: 49

Hi Scott,

With log file we have reproduced the problem, will come back to you shortly on this issue.

With compilation of CodeEditorSyntax demo, could you please try compiling solution located here:
Users\Public\Documents\AlterNET Software\Extensibility Studio 2.0\Demo
AlterNET.Editor.AllDemos.sln and run project CodeEditorSyntax from it?

regards,
Andrew
  Reply

26-Oct-2017 09:05 AM

Scott Myers

Scott Myers

Posts: 6

Thank you. Your suggestion to use the AllDemos solution solved the problem.
  Reply

28-Oct-2017 08:52 AM

Scott Myers

Scott Myers

Posts: 6

It did not occur to us that the long lines in the file could be a problem. Some of the log lines can be 64k or longer in length as they are tracing out the communication between a client and server.

We have decided to modify our products so that long lines are wrapped at the time they are written. This should enable us to display them with and without word wrap and still use a lexer so we can colorize to highlight errors.

I'll let you know how this works out. Thanks for your help.

Scott
  Reply

02-Nov-2017 11:20 AM

Scott Myers

Scott Myers

Posts: 6

I wanted to let you know that we changed the logging in our products to word wrap the log lines, thereby eliminating the 64k+ log lines. The SyntaxEdit control is working fine now. Scrolling to the bottom of a 100mb file and enabling word wrap takes just a few seconds.

Thanks for your help identifying what the problem was.

Scott

  Reply