Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [EMF/GMF] - Performance issue on load and save model. (Howto cache model to limit query to the server)
[EMF/GMF] - Performance issue on load and save model. [message #1063868] Fri, 14 June 2013 11:21 Go to next message
Philippe EUGENE is currently offline Philippe EUGENE
Messages: 26
Registered: January 2011
Junior Member
Hello,
I use the : org.eclipse.emf.ecore.uri_mapping to map my logical URI (business URI) to physical URI (HTTP url).
It's a RESTFULL API to save, load and delete EMF/GMF resource. XMI model (EMF and diagram resources) are saved server-side into a database.
Everything works. All EMF mechanisms are completely transparent.

But the number of requests sent to the server is very too important.
With the resolveProxy option à false i have:

A) Loading a GMF diagram => 5 queries
1 query for load the GMF diagram
2 query for load the corresponding EMF model
2 query for load the container of the EMF model

B) Saving a GMF diagram => 9 queries
2 update for saving GMF model and diagram : OK
7 query for reload : GMF resource / EMF model and his container.

As each GMF diagram own it's resourceSet, every openDiagram action do a lot of HTTP and SQL queries.

Then i search a solution to cache model at the client side and then limit query between client and server.

Thanks for help.

Re: [EMF/GMF] - Performance issue on load and save model. [message #1063871 is a reply to message #1063868] Fri, 14 June 2013 11:39 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25907
Registered: July 2009
Senior Member
Philippe,

Comments below.

On 14/06/2013 5:21 PM, Philippe EUGENE wrote:
> Hello,
> I use the : org.eclipse.emf.ecore.uri_mapping to map my logical URI
> (business URI) to physical URI (HTTP url).
> It's a RESTFULL API to save, load and delete EMF/GMF resource. XMI
> model (EMF and diagram resources) are saved server-side into a database.
> Everything works. All EMF mechanisms are completely transparent.
>
> But the number of requests sent to the server is very too important.
> With the resolveProxy option à false i have:
> A) Loading a GMF diagram => 5 queries
> 1 query for load the GMF diagram
> 2 query for load the corresponding EMF model
I wonder why two?
> 2 query for load the container of the EMF model
Perhaps there's a read-only test?
>
> B) Saving a GMF diagram => 9 queries
> 2 update for saving GMF model and diagram : OK
> 7 query for reload : GMF resource / EMF model and his container.
What's being queries?
>
> As each GMF diagram own it's resourceSet, every openDiagram action do
> a lot of HTTP and SQL queries.
>
> Then i search a solution to cache model at the client side and then
> limit query between client and server.
What would you cache? How could you be sure the cache is consistent
with what's one the server?
>
> Thanks for help.
>
>
Re: [EMF/GMF] - Performance issue on load and save model. [message #1064617 is a reply to message #1063871] Thu, 20 June 2013 05:12 Go to previous message
Philippe EUGENE is currently offline Philippe EUGENE
Messages: 26
Registered: January 2011
Junior Member
Ed,
My first improvement was only on the use of options for loading and saving resources EMF.
No need to customize a URIHandler, just (re)-read chapter 15 of the EMF modeling book. Options in PerformanceXMIResourceFactoryImpl (p. 495) works very well.

Now I'll work on the part GMF editor to see if I can reduce the number of queries (especially saving a diagram).
Thanks for your time.
--
Philippe
Previous Topic:[Teneo] idBag ID generator
Next Topic:Extending the Ecore meta-metamodel (M3)
Goto Forum:
  


Current Time: Tue Jul 22 07:40:22 EDT 2014

Powered by FUDForum. Page generated in 0.01491 seconds