A tiny performance test on Spell Error Highlight

– First, I edited the diffutils.py, using log_timed wrapping highlight functions at line 599 and 600 to help log the time cost.

– Then, created a new review request on my local reviewboard, with a large diff generated from “git diff –full-index release-1.5.2 reviewboard/webapi/tests.py >test.diff” (The diff contains 434 changes and more than 4000 lines and quite a lot strings and comments)

– went to the diff page of that request after restart local server and got log of time like this: pastie.org/1588416

– The time costs are: 1) Fetching: 3.739708 seconds; 2) Patching: 0.36519s; 3) Highlight: 2.814533s; 4) Generating diff chunks: 2.34845s

– For this diff, when not using the filter for spell errors, pastie.org/1590548

the time costs are : 1)Fetching: 1.310890 seconds; 2) Patching: 0.27146s; 3) Highlight: 1.431874s; 4) Generating diff chunks: 2.231105s

 

– tried another diff of reviewboard/webapi/resources.py, contains 176 changes, near 5000 lines and quite a lot strings and comments

– log of time like this: pastie.org/1588433

– The time costs are: 1) Fetching: 3.641606 seconds; 2) Patching: 0.19239s; 3) Highlight: 2.627750s; 4) Generating diff chunks: 0.267105s

– For this diff, when not using the filter for spell errors, pastie.org/1590563

the time costs are : 1)Fetching: 1.351361 seconds; 2) Patching: 0.37602s; 3) Highlight: 1.203272s; 4) Generating diff chunks: 0.263907s

 

Advertisements

2 thoughts on “A tiny performance test on Spell Error Highlight

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s