Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
andre-hohmann opened this issue Feb 21, 2024 · 1 comment · Fixed by #6185
Closed

Comments

@andre-hohmann
Copy link
Collaborator

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.

@andre-hohmann andre-hohmann changed the title Improve the time to open superordinate processes with many subordinate processes Reduce the time to open superordinate processes with many subordinate processes Feb 21, 2024
@BartChris
Copy link
Collaborator

BartChris commented Jul 2, 2024

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: #4925 (reply in thread))

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.

for (Process child : dataEditor.getCurrentChildren()) {
try {
String type = ServiceManager.getProcessService().getBaseType(child.getId());
if (child.getId() == ServiceManager.getProcessService()
.processIdFromUri(structure.getLink().getUri())) {
StructuralElementViewInterface view = dataEditor.getRulesetManagement().getStructuralElementView(
type, dataEditor.getAcquisitionStage(), dataEditor.getPriorityList());
node = new StructureTreeNode("[" + child.getId() + "] " + view.getLabel() + " - "
+ child.getTitle(), null, view.isUndefined(), true, structure);
}

Would it maybe be possible to use some of the mechanisms which Hibernate Search offers to display this information way faster? See: #6095 (reply in thread)

(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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants