cwrc / DEPRECATED--CWRC-Dialogs

0 stars 0 forks source link

Optimizing saving call #45

Open lagoan opened 10 years ago

lagoan commented 10 years ago

A question, from the ARC side, can we explore why the save operation is taking ~3 sec? What parts of the entity save are taking the most time? What are the constituent parts? With this info, we can maybe offer alternatives or optimizations.

mpm1 commented 10 years ago

This may be because when using the Islandora we have to make several calls to the server to create the appropriate object.

  1. We make one call to create a new Object in the database.
  2. Another call is then made to create the datastream and send it's content.
  3. After that we have to make a call to set the state of the object to 'A'
  4. We then make a call to set the relationship value of the model to the entities type.
  5. Finally we make a call to define the collection these entities belong to.

Each on of these calls require us to send the appropriate security information. So, each call must handle a communication handshake, security check and finally the requested action. After that their response must be parsed to decide how to handle the next step.

From the documentation, I can't seem to find a way to set multiple relationships, set the default state on creation, or set the datastream on object creation.

One way to speed things up would be to have an object automatically set it's collection when the model is defined. Another would be to have the state default to 'A'. Would these changes be possible on the server side?

jefferya commented 9 years ago

Needs testing given recent back-end changes.