NEW DATE! Bugzilla will undergo maintenance 2024-03-28 18h00 CET. Bugzilla will be placed in read-only mode at that time.

Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 5238 - Compare fails if takes more than 20 seconds
Summary: Compare fails if takes more than 20 seconds
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Andre Weinand CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 2933 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-10-25 08:56 EDT by Christophe Elek CLA
Modified: 2001-11-27 09:46 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe Elek CLA 2001-10-25 08:56:20 EDT
Customer experiences compare timeout if the compare takes more than 20 seconds.
He wants to be bale to change timout value.
Cust Using 1.0

**************************************
We can reproduce this just comparing two local files.
So it appears to be the compare framework.

Ydo a diff on a file, and it pops up a dialog explicitly telling
you
about a 20 second time-out.  I'll repeat the exercise and post you the
dialog in a short while...

where does it tell you about the 20 sec ? window popping up ?

Very odd.  Where are you suggesting an error message might be present?
There are no other messages obvious in the UI, although I imagine there
might be some logged.

The reason it looked like a coded time-out is that it consistently tells us
that the diff took longer than 20 seconds and therefore was aborted (or
words to that effect).



Customer Said:
I'm using extssh and haven't experienced any problems with the same CVS
repository with other tools (at least nobody has reported any).

The diff engine timing out after 20 seconds does not seem right.  Is
there a way I can tweak this magic period (perhaps a property in some XML
somewhere)?  There's nothing I can find in the preferences to allow this to
be changed.


*****************************
Comment 1 Erich Gamma CLA 2001-11-12 08:45:37 EST
The dialog should provide the option to continue.
Fix is understood, might be difficult to do without API change.
Comment 2 Erich Gamma CLA 2001-11-13 09:05:46 EST
*** Bug 2933 has been marked as a duplicate of this bug. ***
Comment 3 Andre Weinand CLA 2001-11-27 09:46:22 EST
The file comparison algorithm used has O(nd) behavior, where n is the number
of lines and d the number of differences. This becomes roughly O(n2) if there
are lots of differences. This is not a problem as long as the number of lines
is <2000. However if files with more than 15000 lines and (whitespace) 
differences on every line are compared it becomes an issue.
I didn't try to fix the algorithm but I removed the 20 sec timeout and added
a cancable progress dialog to the differencer.
This doesn't solve all problems because now the comparison of the 15000 line 
files results in an OutOfMemoryException (after 5 minutes). However the 
algorithm recoveres from the exception and the end user can try to run it
with the 'ignore whitespace option' turned on.