Bug 471483 - [tests] Consider to use a MemoryFileSystem for unit tests that use the Eclipse WS
Summary: [tests] Consider to use a MemoryFileSystem for unit tests that use the Eclips...
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.9.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-30 16:15 EDT by Sebastian Zarnekow CLA
Modified: 2015-07-05 16:02 EDT (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 Sebastian Zarnekow CLA 2015-06-30 16:15:45 EDT
Along with minor changes in Xtext and a patched PDE, I could evaluate the benefit of a MemoryFileSystem for the workspace in test projects. With SSDs it's not too beneficial as it seems as many of our tests are not i/o bound. For the xtend.ide.PerformanceTest the situation was slightly different. Best cases dropped from 40 secs to 23 secs for the test to finish (indexing of JDT was _sometimes_ faster than with java.io.Files).

i/o was especially visible for our code for the code generator and the debug source installation:

Task 'org.eclipse.xtext.builder.BuilderParticipant.build(IBuildContext, IProgressMonitor)' took 2027ms (9 measurements).
Task 'DebugSourceInstallingCompilationParticipant.install' took 506ms (5 measurements).

vs

Task 'DebugSourceInstallingCompilationParticipant.install' took 2656ms (5 measurements).
Task 'DebugSourceInstallingCompilationParticipant.install' took 591ms (5 measurements).

A MemoryFileSystem may be more relevant on the build server where we don't use SSDs (AFAIK).
Comment 1 Sebastian Zarnekow CLA 2015-06-30 16:19:13 EDT
Scheduled just to make sure we discuss the idea of fixing and contributing smth to PDE.
Comment 2 Sven Efftinge CLA 2015-07-01 02:14:26 EDT
In case we could really fix all the hard coded dependencies to java.io.File (see clients of IPath#getFile() for instance), we wouldn't be able to run our tests against older versions with an in-memory file system. And it would be very likely that it gets broken again as the API is leaky already.

An alternative approach be to build with Java 7 and use something like https://github.com/google/jimfs
Comment 3 Sebastian Zarnekow CLA 2015-07-01 02:57:12 EDT
After an offline discussion we decided to postpone further progress here.

I'll commit the changes in our code that are necessary to support the EFS for Xtext languages and progress with other options for now.