inception-project / inception

INCEpTION provides a semantic annotation platform offering intelligent annotation assistance and knowledge management.

Home Page:https://inception-project.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Annotating excruciatingly slow after upgrading Inception from 32.0 to 32.1

azankl opened this issue · comments

Describe the bug
Since upgrading Inception from 32.0 to 32.1, the annotation process is excruciatingly slow. When I highlight a text span to annotate, Inception shows the ‘spinning wheel’ in the right upper corner and also shows ‘processing’ in the lower left corner for a minute or more before showing anything in the annotation sidebar. For example, in the screenshot below, I just highlighted the word 'brachydactyly':

Screenshot 2024-05-02 at 12 19 51 PM

After a minute or so, the correct annotation appears (see screenshot below):

Screenshot 2024-05-02 at 12 21 59 PM

Interestingly, the annotation also shows suggestions for the HPO term, instead of only the 'Phenotypes' annotation. In the previous version, the HPO term suggestions would only appear later. Maybe that is the reason for the slowness?

Deleting an existing annotation also causes Inception to hang for over a minute before it finally deletes the annotation.

Hope you can fix that.

Please complete the following information:

  • Version and build ID: INCEpTION -- 32.1 (2024-04-30 22:21:12, build c22cbf2)
  • OS: macOS Sonoma 14.4.1 (23E224)
  • Browser: Chrome Version 124.0.6367.119 (Official Build) (arm64)

Does downgrading fix the issue for you?

I could imagine it to get slower when upgrading from pre-32.0 to 32.x due to the entity linker recommender now being synchronous under the theory that the KB has a cache and should in general be not too slow. I don't see an obvious related change from 32.0 to 32.1 though.

Does it speed up if you disable the entity linker recommender in your project?

Is the read-only flag on your knowledge base enabled? If not, the caching will not kick in.

You are right, same problem with 32.0, but working normally in 31.4. Disabling the entity-linker recommender also speeds it up. Read-only flag was not enabled. With read-only flag enabled, it seems to work better, though Inception still 'hangs' sometimes for a few second before updating the annotations.

Tested it a bit more, seems to be working normally now. I still get the occasional freeze, but they are short, 1-2 sec, and infrequent. So all good! Thanks.

Could you make the entity linker recommender being synchronous optional? I kind of got used to the workflow of annotating phenotypes quickly and then going back later to review the recommender's suggestions. This workflow now gets interrupted when Inception becomes unresponsive for a few seconds to add the recommendations.

If you download the 33.0-beta-1, there is a switch in its settings already to put it back into async mode. Mind though if you use that version, you should add debug.cas-doctor.force-release-behavior=true to your settings.properties file to avoid slowness.

Otherwise, I can look if I can backport the relevant changes for 32.2.

Thanks, not a big deal, but having an option for sync/async mode will be nice, I think there are use cases for both modes.