nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] Debian Bug#785508: nano: python highlighting fragile in


From: Benno Schulenberg
Subject: Re: [Nano-devel] Debian Bug#785508: nano: python highlighting fragile in v2.4
Date: Wed, 20 May 2015 13:15:58 +0200

On Wed, May 20, 2015, at 09:04, Alexandre Detiste wrote:
> With the new patch, the only thing slow when working
> on a 30000 lines python file (on a RPi+) is inserting new lines.

The same slowness should occur when adding or deleting (part of)
a delimiter of a multiline coloured string.  In Python that would
be when adding or deleting a third quote in a row.

> But this was already slow with v2.2, it's just a tiny bit
> slower; that could maybe be benchmarked [...]

With the attached patch I've timed things, five Enters, and
five times ^K (in an area unaffected by multiline regexes).
Without the recalculation patch it gives me this:

Function 805ef96 took 17 milliseconds.
Function 805ef96 took 10 milliseconds.
Function 805ef96 took 10 milliseconds.
Function 805ef96 took 10 milliseconds.
Function 805ef96 took 10 milliseconds.

Function 804d564 took 21 milliseconds.
Function 804d564 took 16 milliseconds.
Function 804d564 took 18 milliseconds.
Function 804d564 took 16 milliseconds.
Function 804d564 took 21 milliseconds.

*With* the recalculation patch this:

Function 805efba took 854 milliseconds.
Function 805efba took 848 milliseconds.
Function 805efba took 839 milliseconds.
Function 805efba took 840 milliseconds.
Function 805efba took 838 milliseconds.

Function 804d57c took 846 milliseconds.
Function 804d57c took 849 milliseconds.
Function 804d57c took 849 milliseconds.
Function 804d57c took 845 milliseconds.
Function 804d57c took 848 milliseconds.

That is on a C file of a 185 thousand lines.
Quite a considerable difference.

How do you fare with your 30 thousand lines of Python?

Benno

-- 
http://www.fastmail.com - The way an email service should be

Attachment: timing-it.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]