cjprecord / editra

Editra - Developers Text Editor
Other
3 stars 0 forks source link

Slow scrolling over file loaded from network share #789

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Load "large" (~100KB) file from smb network share over slow link (ex: file 
server over remote VPN).
2. Hold down the Page Down key or use the mouse wheel to scroll file.
3.

What is the expected output? What do you see instead?
Fast, smooth scrolling; instantaneous if possible.  Instead, see jerky 
scrolling while holding page down key / using the mouse wheel. Noticeable lag 
on the order of 0.5 to 1 second occurs very often.

IMPORTANT!!! Please answer these questions for any and ALL bug reports

What version of the product are you using? On what operating system?
0.7.20 on Windows 7 x64

What method of install was your version installed with (Binary/Source)?
Binary

If from source: What version of python and wxPython are you using?

Please provide any additional information below.
Problem seems to manifest itself more with files which have syntax 
highlighting.  Also, larger files are more problematic than smaller ones.  No 
such issue with local files, or those on a local network (1Gbps link).  The 
slower the link, the easier to reproduce.

Unable to attach tcl file where problem was first observed due to proprietary 
information, but the kernel checkpatch.pl script is large enough to reproduce 
with.

Original issue reported on code.google.com by sherm...@gmail.com on 7 Feb 2013 at 6:06

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,

Hard to think that the network share could be the issue as when Editra loads a 
file it loads the entire file into memory at once.

Can only think that perhaps some of the file status monitoring that goes on in 
the background might be slowing the editor down due to the network latency. 

If possible can you check the following things:

1) When this happens is Editra using a high amount of CPU time? (cpu usage in 
task manager is sufficent)

2) If you go to Preferences => General => Files and turn off the "Check if on 
disk file has been modified by others" option. Does the issue go away or still 
persist?

This will greatly help in narrowing the issue.

Thanks

Original comment by CodyPrec...@gmail.com on 7 Feb 2013 at 2:35

GoogleCodeExporter commented 9 years ago
Network environment right now is much better than last night, so it's not as 
clear-cut as when I wrote the initial report.  Anyhow, I tested with a large 
TCL (~667KB) and the checkpatch.pl files by opening one, then holding page up / 
down and staring at the windows task manager for CPU usage.

Running with "Check if on disk file has been modified by others" off:
CPU usage 12-25%, typically around 20-22%

Running with "Check if on disk file has been modified by others" on:
CPU usage 7-23%, typically around 15-18%

The CPU used is a Core 2 Duo T9400, 2.53Ghz, speedstep off.

Subjectively, running with the "Check if on disk file has been modified by 
others" off had the effect of reducing the lag between pauses, though didn't 
really eliminate them.

Original comment by sherm...@gmail.com on 8 Feb 2013 at 1:05

GoogleCodeExporter commented 9 years ago
Thanks for the additional test data. Will investigate and report back if I find 
anything.

Additionally do you have any plugin windows that are open? (PyProject, 
FileBrowser, ect...)

Original comment by CodyPrec...@gmail.com on 8 Feb 2013 at 4:16

GoogleCodeExporter commented 9 years ago
No plugin windows open that I know of; this is only with the main window.  
Actually, this problem seems to affect the UI in general.  I tried opening the 
preferences to turn off various bits of document eye-candy (ie highlight caret 
line, code folding, edge guide, etc.), and it would sometimes take a few 
seconds for a click to register on a tab or a checkbox.  Same problem with 
icons on the toolbar, and the dropdown menus as well.

As a point of comparison, I opened the same file in gVim, and scrolling and UI 
elements responded as they should have, with only occasional hangups.

For this case, nearly all the DSL upload bandwidth is taken by another computer 
uploading photos to a website.  Terrible for accessing remote shares in general.

Out of curiosity, I decided to wireshark the SMB traffic while Editra had 
checkpatch.pl open from the network share.  When Editra is minimized, there is 
no SMB traffic.  The moment that Editra is visible and focused, there begins a 
stream of SMB packets which keeps going on as long as Editra is the focused 
window.  This SMB traffic, consisting of what appears to be "query standard 
path info" and "query basic path info" persisted even if nothing was going on 
in the Editra window; it just had to be focused.  Clicking on another window 
stops the SMB traffic shortly thereafter -- Wireshark notes SMB Tree Disconnect 
and Logoff packets shortly after clicking away from Editra.  So long story 
short, it seems that the program is constantly checking for path info and 
blocking the UI on it until the path info data is received.

Original comment by sherm...@gmail.com on 9 Mar 2013 at 9:59

GoogleCodeExporter commented 9 years ago
As an addendum to the previous comment, the "Check if on disk file has been 
modified by others" option was disabled throughout the tests.

Original comment by sherm...@gmail.com on 9 Mar 2013 at 10:02