[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

O(n**3) behaviour in reintegrate merge

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Sat, 10 Sep 2011 20:48:50 +0300

After cherry-picking r1167546 from trunk to the fs-successor-ids branch
in r1167550, reintegrating that branch to trunk takes a long time
(sufficiently long for the server to assume the client has
disconnected).

Stefan debugged this and found that most time is spent in
combine_with_lastrange(). (Backtrace attached.)

Adding a debug print (patch attached) just above the qsort() shows an
interesting pattern:

[[[
DBG: mergeinfo.c: 439: Sorting with 253 elements
DBG: mergeinfo.c: 439: Sorting with 254 elements
DBG: mergeinfo.c: 439: Sorting with 255 elements
DBG: mergeinfo.c: 439: Sorting with 256 elements
DBG: mergeinfo.c: 439: Sorting with 257 elements
DBG: mergeinfo.c: 439: Sorting with 258 elements
DBG: mergeinfo.c: 439: Sorting with 259 elements
DBG: mergeinfo.c: 439: Sorting with 260 elements
DBG: mergeinfo.c: 439: Sorting with 261 elements
DBG: mergeinfo.c: 439: Sorting with 262 elements
DBG: mergeinfo.c: 439: Sorting with 263 elements
]]]

That happens with both serf and neon, and Stefan reports it was fast
yesterday (before my cherry-pick and other commits today).

Received on 2011-09-10 19:49:46 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.