Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Ecore Tools » XMI saving is very slow...
XMI saving is very slow... [message #664669] Mon, 11 April 2011 14:54 Go to next message
Antoine  is currently offline Antoine Friend
Messages: 22
Registered: February 2011
Location: Toulouse, France
Junior Member
Hello everybody ?!

I've just realize a SpreadSheet metamodel which defines concepts that we found in an Excel File for example.

Il I want to import an Excel file in my model, I import it using the 'Apache POI' API, I read my file, I fill my model and I save it in a ressource (XMI). The model creation is quick enough but the save step is very very slow... I need about one minute to save "only" 1000 rows of my file (30cells by row). Each cell have a reference on a line and on a row, but I think that's too much... With this rythm, I need 16 hours to read one milion of rows...

Do you think that's normal or are there some optimization to this save step?!

Thank you for your answers!

Regards,

Antoine
Re: XMI saving is very slow... [message #664817 is a reply to message #664669] Tue, 12 April 2011 07:58 Go to previous messageGo to next message
Antoine  is currently offline Antoine Friend
Messages: 22
Registered: February 2011
Location: Toulouse, France
Junior Member
I identified the slowest step.

In my MetaModel: each cell refers to a column and to a row, this is a bidirectional reference (each column or row refers to its own cells).
I have about 600.000 cells in my excel file. To import it (read the excel file with API Apache POI, and create object of my model), the algorithm takes about 6seconds. To save this model (resource.save(options); ) in XMI, it takes 16 minutes and 18 seconds. This method (resource.save) is a black box for me, it's a method provides by EMF.

Now if I create 600.000 cells without manage references to columns and rows (I have only bulk cells in my model), the import is unchanged, but the XMI saving takes only 4 seconds...

I have no ID on my objects. So I know that: if an object refers to another, at the moment of the XMI saving, the used ID is the number of the object (in the creation order). And it seems that this step is very very long...

Maybe, are there some options to reduce this cost time? Or another way to save my model?
The thing that I don't understand is: references are define during the model creation, is there another step to create references at the moment of the XMI saving?

Thank you for your answers !

Antoine

[Updated on: Tue, 12 April 2011 10:08]

Report message to a moderator

Re: XMI saving is very slow... [message #665072 is a reply to message #664669] Wed, 13 April 2011 08:06 Go to previous message
Antoine  is currently offline Antoine Friend
Messages: 22
Registered: February 2011
Location: Toulouse, France
Junior Member
I'm gonna use Teneo to have a DB persistence...
Previous Topic:EMF Show model attributes as rows in a table/tree
Next Topic:Text element of a class
Goto Forum:
  


Current Time: Mon Dec 22 22:14:37 GMT 2014

Powered by FUDForum. Page generated in 0.06917 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software