You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Tiziano Degaetano <ti...@conweaver.com> on 2020/12/10 11:22:37 UTC

ManagedIndexSchema takes long for larger schema changes

Hello,

I was checking why my initial schema change is taking several minutes using the managed schema api.
VisualVm shows that most of the time is used in ManagedIndexSchema.postReadInform

[cid:image001.png@01D6CEE9.16DA5EC0]

Looking at the code shows that postReadInform is executed for every modification, and performs an inform on all fields.
At the end inform is called ChagesToSchema * Fields times.

I prepared a PR that changes the flow to only postReadInform once after the changes are done.
improve speed of large schema changes for ManagedIndexSchema · tizianodeg/lucene-solr@54d2161 · GitHub<https://github.com/tizianodeg/lucene-solr/commit/54d2161c8192c7f08e705d33f191b5cd9a087cd5>

this can dramatically decrease managed schema change from several minutes to 1 sec [cid:image002.png@01D6CEEE.143FEB80]

I’m not sure if setLatestSchema is the right place to do the final call to postReadInform and also unsure if making the postReadInform public is acceptable.
How can I propose such an improvement? – Or should I open a Bug request for this?

Kind Regards,
Tiziano