kitodo / kitodo-production

Kitodo.Production is a workflow management tool for mass digitization and is part of the Kitodo Digital Library Suite.
http://www.kitodo.org/software/kitodoproduction/
GNU General Public License v3.0
58 stars 65 forks source link

Reduce the time to open superordinate processes with many subordinate processes #5934

Open andre-hohmann opened 4 months ago

andre-hohmann commented 4 months ago

Is your feature request related to a problem? Please describe. Processes of superordinate processes as for example processes of newspaper years with more than 350 and up to 600 subordinate processes can take up to 20 minutes and more. Furthermore, corrections in ordering, ... is not possible as for example:

Describe the solution you'd like The time to open the superordinate process and the time to modify the structure tree, ... should be reduced.

Additional context There has been an issue before, but during the work in the productive system, the need open the processes faster rises again.

BartChris commented 3 days ago

I suppose that one of the reasons for the slow performance is, that there are a lot of look ups needed to construct the list although the provided information is not really more than the doctype, id and title of the linked child process. (See: https://github.com/kitodo/kitodo-production/discussions/4925#discussioncomment-7653084)

It seems like we do lookups in hundreds of XML files to get minimal information. If i read the code correctly we have to open more than 350 xml files just to get the document type of the children, which - in most cases - is the same for all the children.

https://github.com/kitodo/kitodo-production/blob/1092761b55909dde40490788676df2c7a2a0d0f5/Kitodo/src/main/java/org/kitodo/production/forms/dataeditor/StructurePanel.java#L599-L608

Would it maybe be possible to use some of the mechanisms which Hibernate Search offers to display this information way faster? See: https://github.com/kitodo/kitodo-production/discussions/6095#discussioncomment-9772998

(On a side note: If you have a lot of volumes you would e.g. be interested in the information which is configured as "displaySummary" in the ruleset. (https://github.com/kitodo/kitodo-production/wiki/Regelsatz-3.x#schl%C3%BCssel-mit-besonderer-verwendung), but this is not used here.)