Bug 75541 - Refresh Workspace Automatically should be the default
Summary: Refresh Workspace Automatically should be the default
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-03 06:17 EDT by Oyvind Harboe CLA
Modified: 2006-06-21 09:41 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oyvind Harboe CLA 2004-10-03 06:17:49 EDT
Eclipse caches which files exist on disk exist and their state.

When working with projects that are frequently modified by tools outside 
eclipse, it is a pain to constantly having to do a Refresh manually in the GUI.

It would be much more efficient from a users point of view to get a CPU 
penality instead of a caching mechanism that constantly gets in the way.


Øyvind
Comment 1 Billy Biggs CLA 2004-10-04 14:04:24 EDT
See:

  Window > Preferences > Workbench > [X] Refresh Workspace Automatically

I think this does what you are looking for.
Comment 2 Oyvind Harboe CLA 2004-10-04 16:21:11 EDT
>See:
>
>  Window > Preferences > Workbench > [X] Refresh Workspace Automatically
>
>I think this does what you are looking for.

If this option actually works, then it should be the default.


Øyvind
Comment 3 Oyvind Harboe CLA 2004-10-04 16:24:20 EDT
If this option has any nasty side effects, then those would have to be 
addressed before this could be made the default obviously.


(I'll be testing this option now to see that it actually works. I seem to 
remember that in some other bug-report it was claimed that it wasn't designed 
to work in all cases, but I haven't got the details on top of my head.)

Øyvind
Comment 4 Kim Horne CLA 2004-10-04 16:43:08 EDT
I believe that option only has impact on workbench startup.  I don't think we
have any option to periodically refresh the workspace.
Comment 5 Billy Biggs CLA 2004-10-04 16:47:52 EDT
John Arthorne claims that this does occur at runtime, using polling on Linux and
some Win32 notification stuff on Windows.
Comment 6 Billy Biggs CLA 2004-10-04 16:52:22 EDT
I do not think this should be the default because it is resource intensive on
Linux because it has to poll.
Comment 7 Oyvind Harboe CLA 2004-10-04 16:53:34 EDT
>I believe that option only has impact on workbench startup.  I don't think 
>we have any option to periodically refresh the workspace.

How about not caching information at all?

The OS file system should do any caching efficiently enough for almost all 
purposes. In fact, are you sure that the Eclipse caching of file states is 
more efficient than the underlying operating systems routines?  Or perhaps the 
information is cached for a reason other than performance. 

It shouldn't be necessary to do a Refresh before a Team->Commit. There is a 
scary error message at the end of a commit if the workspace is out of sync.

Similarly for other operations, e.g Search->Files.

Having to enable a preference option to "fix" these strange and frightening 
error messages is just wrong.

My motivation for pursuing a solution to this problem is that I'm trying to 
get some engineers to use CVS, and all such error messags are waved as "proof 
that CVS is buggy, is just a big fat waste of time and besides why do we want 
version control anyway?" :-)

Øyvind
Comment 8 Oyvind Harboe CLA 2004-10-04 16:54:46 EDT
>I do not think this should be the default because it is resource 
>intensive on Linux because it has to poll.

"Correct but inefficient" is a better default than "mostly correct, but fast".

Øyvind
Comment 9 John Arthorne CLA 2004-10-04 17:23:38 EDT
Storing file stat information in memory is not a performance optimization. We
need to be able to detect when a file has changed on disk. For example, the
incremental Java builder needs to recompile Java files when their content
changes on disk. An unchanged editor that is open on a file needs to update the
characters on the screen when the contents change on disk. In the absence of
"cached" information in memory, we could not detect when a file has changed, and
the tools that care about those changes would not be able to react. I suggest
marking this wontfix.
Comment 10 Oyvind Harboe CLA 2004-10-04 17:39:39 EDT
>I suggest marking this wontfix.

There are significant unresolved user interface issues here.  

Should they remain unaddressed?

It took me a couple of years to even consider the possibility of the existence 
of a "make annoying requesters go away option" in preferences. Eclipse has way 
to many options as it is.

Is reduced performance the only thing that speaks against making "Refresh 
Workspace Automatically" the default?

Surely this performance difference is only significant for large projects(i.e. 
more expert Eclipse users). 

I'm not even convinced that the option should exist at all, i.e. automatically 
updated should be the forced behaviour. 

Are there any numbers to back up the claim that this affects performance 
adversely in any significant measure?

Øyvind
Comment 11 Billy Biggs CLA 2004-10-04 18:10:20 EDT
I agree that Eclipse has too many preferences and that they should be reduced. 
As well, if there are "strange and frightening error messages" then these should
probably be improved.  However, this bug is getting too complicated.  Let's keep
it about the preference itself, and if you think the error messages can be
improved then please file a new bug about that.

Since this preference and its default is decided by Platform Resources, I am
reassigning this bug to them to consider.
Comment 12 John Arthorne CLA 2004-10-04 18:23:12 EDT
Users with large projects are very common. We turned the preference off by
default because we believed that users who frequently use external tools on the
files in their workspace are probably less common. Forcing a performance hit on
all users to support this uncommon usage was deemed unacceptable.

Of course, we have no hard statistics on the number of users who frequently make
external changes, or on the number of users who would feel the performance
effects of having this preference turned on.  We'll watch the vote tally on this
bug to see how many people want this default changed. For contrast, see bug
74392, where the user has 75,000 resources in a single project, and it takes
over eight minutes to perform a single "refresh". For such users, turning this
feature on would be disastrous.