On Fri, Aug 07, 2020 at 03:15:05PM -0400, Jose Blanco wrote: > I made this change in 5.1 which did not cause any performance issues, but > with 6.3 I'm seeing performance issues. > > I've added a new field so that the user can map the item being entered into > different collections at deposit time. The user will be presented with a > list of collections for which he/she has ADD privileges. He/She can then > select the collection(s). > > So, the building of this list is done in DCInput.java file. I have tried > several variations to create the list, but they are all too slow. We have > above 1,500 collections. I have put my code in gist. In development where > we have a lot less collections, it is slower, but not that noticeable. > Here is where the building of the list happens. > > https://gist.github.com/blancoj/6d8e083527beaf198fe4c255104eeadf#file-dcinput-java-L176 > > I wonder if anyone has any insight on how to make this work more > efficiently. Presently I have removed this option from the item-input.xml > file because the performance is so bad.
The code in DCInput itself looks fairly speedy. I haven't traced all of the code paths, but I would first see how much time is spent in CollectionService.findAuthorizedOptimized. It is doing a *lot* of database searching, and we may be missing an important index. If we are, please submit a bug report. That method also might be a bit faster if it used a HashSet or a TreeSet rather than an ArrayList for 'collections'. Then the repeated sequential scans of this java.util.Collection could be eliminated: just 'add' and let Set deal with duplicates. I doubt whether this is a significant part of the cost of this method, though. If it is, please submit a bug report. Profiling might help to zero in on the place(s) where this is slow. BTW in https://gist.github.com/blancoj/6d8e083527beaf198fe4c255104eeadf#file-dcinput-java-L191 the comparison should be '!the_id.equals(pr_collection_id)'. -- Mark H. Wood Lead Technology Analyst University Library Indiana University - Purdue University Indianapolis 755 W. Michigan Street Indianapolis, IN 46202 317-274-0749 www.ulib.iupui.edu -- All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/ --- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/20200810143734.GA1016%40IUPUI.Edu.
signature.asc
Description: PGP signature
