Opened 2 years ago

Closed 2 years ago

#1799 closed enhancement (fixed)

[colorize egg] slow on big files

Reported by: curium Owned by:
Priority: minor Milestone: someday
Component: extensions Version: 5.3.0
Keywords: colorize Cc: sjamaan
Estimated difficulty:

Description

When trying to colorize big files such as chicken's runtime.c, according to chicken profiler, 96% of time is spent on append at line 296. One enhancement could be to cons tokens and then return the reversed result. Time to colorize runtime.c goes from 10m to 02s.

Another thing which I would like is to have htmlize exported: if someone is using html-colorize, they could need that function to handle a case where the text doesn't need colorization.

Tentative diff attached.

Attachments (1)

colorize.diff (1.9 KB) - added by curium 2 years ago.
Diff that replaces append with cons, returns reversed result, exports htmlize.

Download all attachments as: .zip

Change History (2)

Changed 2 years ago by curium

Attachment: colorize.diff added

Diff that replaces append with cons, returns reversed result, exports htmlize.

comment:1 Changed 2 years ago by sjamaan

Resolution: fixed
Status: newclosed

Thanks a bunch, this is a great improvement! I'm a bit embarrassed I overlooked that though ;)

Should be available as 0.5 soonish.

Note: See TracTickets for help on using tickets.