Note that there are some explanatory texts on larger screens.

plurals
  1. POZK binder updating lists slow
    text
    copied!<p>For some time I have been working with ZK and now I have an application hosted in the cloud but this does not meet my performance expectations. My application uses ZK for the view, Hibernate for the interaction with the MySQL database and Spring for the management of beans related to database interaction.</p> <p>Example scenario: </p> <ol> <li>At initialization a list is retrieved from the database using hibernate (we are talking about max 200 objects, max 6 standard attributes). This takes some time, but is acceptable.</li> <li>I add or delete objects from the list I use @NotifyChange("list") to tell the view that the list has changed.</li> <li>The list is updated but this takes long, in my opinion (~2 seconds)</li> </ol> <p>Step 3 takes about as long as step 1 which I don't understand, the Spring managed objects for database interaction have yet been initialized. Another thing to note is that I don't reload the entire list from the database when adding or deleting an object from the list; A local copy is kept of the objects in the spring managed bean @Autowired to my ViewModels. (Yes, potentially out of sync with the database, but in my case not much of an issue) But this eliminates hibernate/spring/database as the bottleneck, right?.</p> <p>Also I ran this on the localhost, and of course that is faster but still not instant as I would expect/want.</p> <p>Now I thought that it might have to do something with the creation and deletion of objects in java related to lists. I did research on how the ZK binder works and how objects are updated but I can't find anything about how the binder handles updates on lists. </p> <p>Does anyone know how the ZK binder updates a list in the view when in the viewmodel the method is annotated with @NotifyChange("listA") ? Does it actually throw away the old list and sets the whole new list, or does it somehow have a merge on differences?</p> <p>Also comments on what else could be the bottleneck are very welcome!</p> <p>Thanks in advance,</p> <p>Robert</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload