Bug 223317 - Apply Patch with Fuzz factor 100000 is long running
Summary: Apply Patch with Fuzz factor 100000 is long running
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: CVS (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: platform-cvs-inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-20 04:47 EDT by Benno Baumgartner CLA
Modified: 2019-09-02 15:11 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benno Baumgartner CLA 2008-03-20 04:47:07 EDT
I20080318-0800

1. Team>Apply Patch...
2. Set Preview Patch Page > Patch options > Fuzz Factor to 100000
Is:
 Eclipse is not responding for about a minute
Should:
 User should not be allowed to provide such a high number
Comment 1 Tomasz Zarna CLA 2008-03-25 05:20:18 EDT
agree this might be an issue. Here is what options I can see to improve the way fuzz factor works:

1. We could warn the user when he/she is trying to use the factor greater that the MAXIMUM_FUZZ_FACTOR constant, which is 2 by default. Not allowing to use a greater factor is an option too.
2. A more sophisticated approach would be to check the number of context lines in a patch and then proceed as in 1.
3. Finally, to prevent the workbench from being not responsive we could consider running the whole operation in the background. This would also allow the user to cancel it if it takes too long.

IMO, combining 2 and 3 would be the perfect solution. What do you think Benno?
Comment 2 Benno Baumgartner CLA 2008-03-25 06:13:02 EDT
(In reply to comment #1)
> agree this might be an issue. Here is what options I can see to improve the way
> fuzz factor works:
> 
> 1. We could warn the user when he/she is trying to use the factor greater that
> the MAXIMUM_FUZZ_FACTOR constant, which is 2 by default. Not allowing to use a
> greater factor is an option too.
> 2. A more sophisticated approach would be to check the number of context lines
> in a patch and then proceed as in 1.
> 3. Finally, to prevent the workbench from being not responsive we could
> consider running the whole operation in the background. This would also allow
> the user to cancel it if it takes too long.
> 
> IMO, combining 2 and 3 would be the perfect solution. What do you think Benno?
> 

Mmm, sorry, I don't understand how this works (that's probably also the cause for me to use a factor of 100000:-) Does it make sense to provide a value greater then MAXIMUM_FUZZ_FACTOR? If not then just don't allow the user to provide one which is greater (or show an error and disable finish). If yes then the constants name is somewhat misleading. I thought an easy fix would be to just not allow the user to type in a value greater then say 1000?
Comment 3 Tomasz Zarna CLA 2008-03-25 07:26:17 EDT
Normally, there are at most 3 lines of context, so the default max fuzz factor is 3-1=2 because we decided that ignoring all context lines could be quite risky. There was a discussion about it on one of the bugs related to the fuzz factor. If you wish I can look for it and send you the link. 

Anyway, the constant is only used when auto guessing the factor. However, it is possible to create a patch with number of context lines greater then the default value, so allowing the user to enter the fuzz factor manually made sense to me.

PS. Entering a factor of 100000 isn't that bad, typing there "yes" would be worse ;)
Comment 4 Dani Megert CLA 2008-10-20 09:00:37 EDT
I accidentally hit 9 too many times and now my workspace is blocked and after 2 minutes I decided to kill it.
Comment 5 Eclipse Genie CLA 2018-10-01 19:22:12 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 6 Lars Vogel CLA 2019-09-02 15:08:26 EDT
This bug has been marked as stalebug a while ago without any further interaction.

If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard flag.
Comment 7 Lars Vogel CLA 2019-09-02 15:11:30 EDT
This bug was marked as stalebug a while ago. Marking as worksforme.

If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard tag.