tlambert03 / napari-omero

Browse your OMERO database from within napari.
GNU General Public License v2.0
33 stars 10 forks source link

Omero tree fixes #10

Closed will-moore closed 4 years ago

will-moore commented 4 years ago

Fixes a couple of issues from #9

To test:

$ omero login
# idr.openmicroscopy.org, public, public
$ napari_omero

The biggest issue now is that we try to load the whole depth of the tree up-front, instead of waiting for the user to expand each node. This means that with IDR, you are loading forever and never reach the whole tree. But the top of the tree loads OK:

Screenshot 2020-06-25 at 16 26 30

codecov-commenter commented 4 years ago

Codecov Report

Merging #10 into master will not change coverage. The diff coverage is 0.00%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master     #10   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files          11      11           
  Lines         703     724   +21     
======================================
- Misses        703     724   +21     
Impacted Files Coverage Δ
src/napari_omero/widgets/gateway.py 0.00% <0.00%> (ø)
src/napari_omero/widgets/main.py 0.00% <0.00%> (ø)
src/napari_omero/widgets/tree_model.py 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 70065ef...216aeec. Read the comment docs.

tlambert03 commented 4 years ago

oh awesome. thank you!

The biggest issue now is that we try to load the whole depth of the tree up-front, instead of waiting for the user to expand each node.

Yeah that was a short-term hack. I'll follow up and fix the _populate_tree method to be lazy again, using fetchMore and canFetchMore (which you may have seen were commented out for now). I did want to ask though, I feel like expanding a node (fetching children for just that node) is still much slower than it is in the webclient. Any thoughts there? Is there any prefetching going on in the webclient to make it snappy?

tlambert03 commented 4 years ago

I've also left out screens for now... since I have no experience with them

will-moore commented 4 years ago

Using those getObjects() queries might be a bit faster. I noticed that the listChildren() calls are also loading annotations. Also the caching of childCount should help a little. Can't think of anything else just now.

will-moore commented 4 years ago

Working well. Thanks 👍

tlambert03 commented 4 years ago

there's enough goodness here to merge. we can address further improvements to the tree later