Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large selection #2469

Merged
merged 16 commits into from May 16, 2014
Merged

Large selection #2469

merged 16 commits into from May 16, 2014

Conversation

jburel
Copy link
Member

@jburel jburel commented May 8, 2014

Review selection and loading of annotations.
Few methods were loaded twice and call not optimised.
see https://trac.openmicroscopy.org.uk/ome/ticket/12086

To test:

  • Log in as user-4
  • Display read-only group
  • Expand the Orphaned images folder (>800 images)
  • Select all in the images (~800) from the tree
  • Deselect
  • Select now from the central panel.

jburel added 9 commits May 7, 2014 11:33
The method was invoked twice. This means that the annotation
were loaded twice.
When selected the node (displayed in tree), the annotations
were loaded twice.
This could lead to out of memory exception due to the
number of call.
@jburel jburel added the dev_5_0 label May 8, 2014
@bpindelski
Copy link

This still causes issues. Tested on Ubuntu. Followed these steps:

  • Log in as user-4
  • Display read-only group
  • Expand the Orphaned images folder (>800 images)
  • Select all in the images (~800) from the tree (holding the Shift key and clicking)
  • Deselect by clicking on a single element in the tree
  • Select from the central panel (again using Shift)
  • Deselect in the central panel by clicking on a single item in the central panel

Insight hangs. I attached a jstack output to the ticket.

@jburel
Copy link
Member Author

jburel commented May 9, 2014

@bpindelski:

  • Did you wait for the annotations to be loaded for the first selection (800), before switching to another selection?

@bpindelski
Copy link

Yes, I tested again and waited a minute before doing each select/deselect. From what I see, the hang happens when I deselect a large selection by using the central panel - deselecting in the tree doesn't upset Insight.

@jburel
Copy link
Member Author

jburel commented May 9, 2014

@bpindelski: thanks for info

Issue occurred when deselecting from central panel using the
table view.
@jburel
Copy link
Member Author

jburel commented May 9, 2014

@bpindelski: The last commit should fix the issue.

removeSelectedDisplay(previouslySelectedDisplay);
Colors colors = Colors.getInstance();
for (final ImageDisplay node : previouslySelectedDisplays) {
node.setHighlight(colors.getDeselectedHighLight(node));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing indentation.

@bpindelski
Copy link

From the UX perspective - this is good to merge. From the code perspective - I'd rather ask someone more knowledgeable in Insight code to review the changes. @dominikl or @mtbc maybe?

@mtbc
Copy link
Member

mtbc commented May 9, 2014

I did actually glance it over previously but, apart from the minor thought that the Map<Long, List<IObject>> could have been a Multimap<Long, IObject> for convenience, certainly didn't see any obvious problems. There are a lot of lines changed though so I would encourage @dominikl to take a look too.

@jburel
Copy link
Member Author

jburel commented May 9, 2014

@bpindelski: unless I totally reformat the code, we will have the issue with the indentation. (i.e. tabs vs space). I can do it when the review is complete otherwise it is very difficult to review it.

@bpindelski
Copy link

@jburel The indentation is a "nice-to-have", but not a blocker.

@jburel
Copy link
Member Author

jburel commented May 9, 2014

I would like to clean it, just due to the number of changes I was holding off. Will do it when we are all happy with the changes.

@dominikl
Copy link
Member

dominikl commented May 9, 2014

Looks good to me, too.

@joshmoore
Copy link
Member

Next step?

@jburel
Copy link
Member Author

jburel commented May 14, 2014

I will push the multimap commit later today then we should be ready.

@jburel
Copy link
Member Author

jburel commented May 14, 2014

@mtbc: replace map by multimap. no more changes to come.

} catch (Exception e) {
UserNotifier un =
TreeViewerAgent.getRegistry().getUserNotifier();
un.notifyInfo("Image Not valid",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here and below, weird to capitalize "not" but not "valid"

@mtbc
Copy link
Member

mtbc commented May 15, 2014

Seems to actually work just fine, no actual blockers to merging.

}
}
Map<Long, Collection<AnnotationData>> filesetMap =
new HashMap<Long, Collection<AnnotationData>>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe move the possibly wasted new to an else, can make the variable final to make sure it does get assigned

@mtbc
Copy link
Member

mtbc commented May 15, 2014

For the avoidance of doubt, this is already okay to merge, it's a clear improvement that should be in 5.0.2.

@jburel
Copy link
Member Author

jburel commented May 15, 2014

@mtbc: as indicated previously, I won't fix indent this makes the changes difficult to review.
This is due to a mix of tabs and spaces usage now. Happy to do it but we must be ready for a 90% "rewrite" of each class.

I can do that when we are happy with the changes

@mtbc
Copy link
Member

mtbc commented May 16, 2014

I tried to comment only on indent that was within a larger block of green added lines. Still, latest commits look good, this PR remains good to merge.

@joshmoore
Copy link
Member

Thanks, guys.

joshmoore added a commit that referenced this pull request May 16, 2014
@joshmoore joshmoore merged commit 58b5cd7 into ome:dev_5_0 May 16, 2014
@jburel jburel deleted the large-selection branch May 19, 2014 08:22
@jburel jburel mentioned this pull request May 19, 2014
@jburel
Copy link
Member Author

jburel commented May 19, 2014

--rebased-to #2512

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants