qdiff is order of magnitude slower than plain diff for 100K+ C file

Bug #583222 reported by Alexander Belchenko on 2010-05-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QBzr
Medium
Unassigned

Bug Description

Even with small amount of changes (less than 10 lines) in BIG file (C file more than 100KiB size, more than 3500 lines) qdiff is very slow.

C:\work\MyCode\logic-cvv>timeit bzr --lsprof-file qdiff-big-file.callgrind qdiff
Profile data written to "qdiff-big-file.callgrind".

time: 22.642

C:\work\MyCode\logic-cvv>timeit bzr --lsprof-file diff-big-file.callgrind diff
...
Profile data written to "diff-big-file.callgrind".

time: 2.457

Time in seconds.

Callgrinds for both cases are attached. My best guess we spend too much time either in syntax highlighting code or in drawing diff on the screen.

We discussed with Gary on UDS syntax highlighting. It should be done in second pass, after actual diff will be shown on the screen. Or at least will be nice to switch it off (manually or automatically) for all or only BIG files.

Alexander Belchenko (bialix) wrote :
Changed in qbzr:
status: New → Confirmed
importance: Undecided → Medium
Alexander Belchenko (bialix) wrote :
Alexander Belchenko (bialix) wrote :

quick look at callgrind for qdiff reveals syntax highlighter stuff at the top of the file. Does it means it's the biggest player there?

Gary van der Merwe (garyvdm) wrote :

Yes, the syntax highlighting is 83% of initial_load.

tags: added: qdiff
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers