Bug #1872

Updated by Matthieu Decorde 3 months ago

When many annotations are created the current code creates as many SQL transactions as annotations to create.

Note : Windows TXM seems slower as annotations are created.

h3. Solution

# Create annotation creation methods without transaction and update concordance editor to use only one transaction.
# flush & clear the entity manager each new 1000 10000 created entity
# if not enough, commit the transaction each new 10000 20000 created entity

Annotation creation time differs from annotation update time : 60k annotations -> 1.5s
Create F10 C20: 122s
Create F1 C20: 14s
50k annotations -> 1s
Create F10 C10: 87s
Create F1 C10: 15s
Update F1,F10 C10,20: 2,5s
40k annotations -> flushing is enough to speed up the process 0.5s

h3. Validation test

* Create a concordance with [] query
* annotate more than 50 000 lines in the concordance
* check if the duration is OK

Back