geneontology/minerva

In some cases, large models significantly slow minerva

kltm opened this issue · 12 comments

kltm commented

For example:

http://noctua-dev.berkeleybop.org/editor/graph/gomodel:5b318d0900000194

It's possible that this is an issue in minerva. @balhoff

kltm commented

From @balhoff
"I narrowed it down to this method...":
//TODO this loop is the slowest part of the service response time.

A partial fix, removing the biggest slowdown in the code path, is implemented in #468. The changes are merged to dev for testing.

We should keep this issue open until also fixing this one:

/**
* //TODO this is slow, speed it up. The slowest part of the service, including reasoning and validation.
*
* @param i
* @return Map to be passed to Gson
*/
public JsonOwlIndividual renderObject(OWLNamedIndividual i) {

kltm commented

@balhoff Pulled and cycled on noctua-dev for testing.

A follow up PR #473 with some additional performance gains has been merged into dev for testing.

@vanaukenk this latest performance improvement is deployed for testing on noctua-dev. It affects how relation labels are found in Minerva, so please note any oddities there. The big models like http://noctua-dev.berkeleybop.org/editor/graph/gomodel:5b318d0900000194 should load much more quickly as well.

Here are some Noctua graph approximate loading time stats on my machine today:

Gluconeogenesis imported from Reactome.

  • 5 sec Noctua-dev
  • 6 sec Noctua-prod

Ctnnb1 (MGI:MGI:88276)

  • 29 sec Noctua-dev
  • 34 sec Noctua-prod

Wnt3a (MGI:MGI:98956)

  • 3 sec Noctua-dev
  • 5 sec Noctua-prod

C. elegans IRE-1 mediated unfolded protein response

  • 5 sec Noctua-dev
  • 8 sec Noctua-prod

Noctua-prod is generally faster, but I don't know if this constitutes 'much more quickly'.

I haven't seen any issues with how labels are being displayed.

With help from @tmushayahama , we also tested and checked the Fetch/XHR times and see an approximately 50% reduction in the form editor table for loading mouse Ctnnb1 on dev (3.07s) vs prod (8.76s). Prod seems even faster than before, but there is still a noticeable decrease on dev.

kltm commented

@vanaukenk Shall I take this to be a pass for this PR, with it going to production on next cycle?

@kltm - yes, we can't find anything systematically out of order. Thx.

@vanaukenk your measurements are very different from what I see here. Maybe we should look at this live next time we meet. For me Ctnnb1 (MGI:MGI:88276) (http://noctua.geneontology.org/editor/graph/gomodel:6205c24300000538) loads in a few seconds, most of which is client-side I think.

@balhoff yes, we could look at this together some time. Are you looking at the graph or form?

Also, with @tmushayahama we were looking at the loading times as recorded in the browser, while when I was testing this myself, it was just crudely counting.

I was looking at the graph. My PR was optimizing one specific loading time for the initial m3Batch, which Tremayne was probably looking at, but also just overall the page loads in a few seconds for me.