Find & Navigate jump to wrong location

57 views
Skip to first unread message

gar

unread,
Mar 2, 2020, 3:42:02 PM3/2/20
to leo-editor
Add @edit modes/php.py in leo 6.2-b1-devel.
Find "::php_lit", press F3 - "ne_start" is selected on the line where nothing similar to search string at al.
Then do the same with <C>-<S>-F - all matches lead to random location w/o desired pattern.

I suspect this happens for nodes with some great number of lines. For nodes with less amount of lines everything works as expected.

Edward K. Ream

unread,
Mar 3, 2020, 5:04:06 AM3/3/20
to leo-editor
On Monday, March 2, 2020 at 2:42:02 PM UTC-6, gar wrote:

Add @edit modes/php.py in leo 6.2-b1-devel.
Find "::php_lit", press F3 - "ne_start" is selected on the line where nothing similar to search string at al.
Then do the same with <C>-<S>-F - all matches lead to random location w/o desired pattern.

Everything works as expected for me.

I suspect this happens for nodes with some great number of lines. For nodes with less amount of lines everything works as expected.

Very unlikely. With just a few exceptions related to directives, there is no length-dependent code anywhere in Leo.

Edward

gar

unread,
Mar 3, 2020, 6:03:16 AM3/3/20
to leo-e...@googlegroups.com
Very strange. Tested right now on anther box. Searched for "php_rule70".
It doesnt even change the screen on doubleclick. And works extremely slow.
Did you included it as @edit?

вт, 3 мар. 2020 г. в 13:04, Edward K. Ream <edre...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/57ce3754-fc7c-4184-af49-3790f66dde87%40googlegroups.com.

Edward K. Ream

unread,
Mar 3, 2020, 1:19:38 PM3/3/20
to leo-editor
On Tue, Mar 3, 2020 at 5:03 AM gar <gar...@gmail.com> wrote:
Very strange. Tested right now on anther box. Searched for "php_rule70".
It doesnt even change the screen on doubleclick. And works extremely slow.
Did you included it as @edit?

Yes.

Edward

Thomas Passin

unread,
Mar 3, 2020, 4:04:17 PM3/3/20
to leo-editor
I imported a 15MB text file (10,000 lines) using Read-File-Into-Node.  It worked, but it took a long time.  Scrolling or jumping within the file also took a very long time.  Jumping from the end to the start took several seconds.  A search from the start to a phrase at the end took about 5 seconds or so.  The cursor couldn't track as I marked a phrase, but after several seconds the phrase became highlighted.

Also, after moving away from this tab to another Leo file, moving back to this one took about 15 seconds before it displayed.   And operations in other Leo outlines open at the same time was sluggish.

And I have a pretty fast computer.

For comparison, Notepad++ on Windows loaded the same file in under 1/2 second.

I presume this behavior is a limitation of the underlying QT5 implementation, though I don't see why sluggishness bled into other tabs.

Edward K. Ream

unread,
Mar 3, 2020, 6:52:48 PM3/3/20
to leo-editor
On Tue, Mar 3, 2020 at 3:04 PM Thomas Passin <tbp1...@gmail.com> wrote:

I imported a 15MB text file (10,000 lines) using Read-File-Into-Node. 

@killcolor should speed things up considerably.

That said, it would be more Leonine to split the file into nodes.  But you knew that.

In any case, there is no way, other than @killcolor, to improve performance on large text. Leo has other priorities.

Edward

Thomas Passin

unread,
Mar 3, 2020, 8:15:34 PM3/3/20
to leo-editor


On Tuesday, March 3, 2020 at 6:52:48 PM UTC-5, Edward K. Ream wrote:
On Tue, Mar 3, 2020 at 3:04 PM Thomas Passin <tbp1...@gmail.com> wrote:

I imported a 15MB text file (10,000 lines) using Read-File-Into-Node. 

@killcolor should speed things up considerably.

That said, it would be more Leonine to split the file into nodes.  But you knew that.

Yes, I don't know why anyone would actually want to do that - too hard to edit and find things.

gar

unread,
Mar 4, 2020, 12:03:53 AM3/4/20
to leo-e...@googlegroups.com
Yes, I don't know why anyone would actually want to do that - too hard to edit and find things. 
I used that particular case to have a reference implementation of the things I need.
Built-in @auto-import algo gave me too many nodes so I decided to use @edit to see the whole picture at the moment.
The file was not really huge, but "search" functions were broken. And yes, it was slow. 

Using @killcolor made the search function to work as expected - no it jumps exactly to the line where the search string is. Thanks for that advise.

Edward K. Ream

unread,
Mar 4, 2020, 6:14:13 AM3/4/20
to leo-editor


On Tue, Mar 3, 2020 at 11:03 PM gar <gar...@gmail.com> wrote:

Using @killcolor made the search function to work as expected - [now] it jumps exactly to the line where the search string is.

Good.
Thanks for that advise.

You're welcome.

Edward
Reply all
Reply to author
Forward
0 new messages