silent appending to an IFile [message #169223] |
Thu, 11 December 2003 15:07 |
Tony Poppleton Messages: 2 Registered: July 2009 |
Junior Member |
|
|
Hello,
I have an action that triggers a very long running operation in a new thread
that continously dumps results to an IFile using the appendContents method.
The problem is that when this happens the whole project tree flashes and
refreshes, and it is 5 times slower than writing directly to a java.io.File.
Presumably this is because of the events that are triggered and the
corresponding listeners. Is there a mechanism for silently appending to a
file, or any other method that could stop the triggering of these events? I
don't notice any such effects when the java files are compiled to class
files by the jdt project, do they have some trick for doing this?
Thanks,
Tony
--
--
Tony Poppleton
Evolutionary Scientist
Codefarm Software Limited
Sussex Innovation Centre
Science Park Square, Falmer, Brighton, BN1 9SB, UK
tel: +44 (0)1273 704417 fax: +44 (0)1273 704499
http://www.codefarm.com/
Codefarm is a leading provider of optimization software, specialising
in distributed and evolutionary computing technologies.
|
|
|
Re: silent appending to an IFile [message #172021 is a reply to message #169223] |
Thu, 18 December 2003 17:28 |
Eclipse User |
|
|
|
Originally posted by: John_Arthorne.oti.com_
You can batch a set of changes to avoid resource change events using
IWorkspace.run(IWorkspaceRunnable). In Eclipse 3.0, you can also make
your background activity a subclass of WorkspaceJob. A WorkspaceJob
will batch its changes automatically. See
org.eclipse.core.runtime.jobs.Job, and
org.eclipse.core.resources.WorkspaceJob for more details.
--
Tony wrote:
> Hello,
>
> I have an action that triggers a very long running operation in a new thread
> that continously dumps results to an IFile using the appendContents method.
> The problem is that when this happens the whole project tree flashes and
> refreshes, and it is 5 times slower than writing directly to a java.io.File.
> Presumably this is because of the events that are triggered and the
> corresponding listeners. Is there a mechanism for silently appending to a
> file, or any other method that could stop the triggering of these events? I
> don't notice any such effects when the java files are compiled to class
> files by the jdt project, do they have some trick for doing this?
>
> Thanks,
> Tony
>
> --
> --
> Tony Poppleton
> Evolutionary Scientist
> Codefarm Software Limited
> Sussex Innovation Centre
> Science Park Square, Falmer, Brighton, BN1 9SB, UK
> tel: +44 (0)1273 704417 fax: +44 (0)1273 704499
> http://www.codefarm.com/
>
> Codefarm is a leading provider of optimization software, specialising
> in distributed and evolutionary computing technologies.
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03118 seconds