eclipse-platform / eclipse.platform.ui

Eclipse Platform
https://projects.eclipse.org/projects/eclipse.platform
Eclipse Public License 2.0
80 stars 172 forks source link

SoftLimit: Soft and hard limit of elements in the Problems view #1010

Open iloveeclipse opened 1 year ago

iloveeclipse commented 1 year ago

Right now Problems view allows to "hard limit" the shown content by "cutting" the data coming from content provider.

Example: if project has 20.000 problems reported only 100 are shown by default because of the limit, and there is no way for user to see more without changing limit in the preferences of the Problems view. Users that are not aware about the preference have no clue how to get all the problems (or just more) shown...

With the https://github.com/eclipse-platform/eclipse.platform.ui/issues/818 we have applied "soft viewer limit" on the Problems view that currently uses workbench default viewer limit of 1000 children per parent.

This now makes power users angry that set the Problems view "hard limit" to 20.000:

When i configure the view to show 20000 elements i know what i am doing and do not expect to get asked for every 1000 to expand!

We have few alternatives for the possible solution.

1) Temporarily don't apply "soft limit" on Problems view for 4.29 and do the "perfect" solution in 4.30. 2) Replace Problems view content provider "hard limit" with viewer "soft limit". 3) Unset "soft" viewer limit in the Problems view if the content limit is higher. 4) Something else

Also we we could bump Problems view default limit of 100 problems to the value that is two times higher as "soft limit".

For 2) we have to check how "bad" the performance would be (just unset the limit in the Problems view) and also refactor lot of code in Problems view that deals with "hard limit". Pointer: see callers of org.eclipse.ui.internal.views.markers.MarkerContentGenerator.markerLimits.

For 3) the change would be minimal and could make "power user" happy for 4.28 release.

I personally tend to 3) for 4.28 and 2) for 4.29.

iloveeclipse commented 1 year ago

@jukzi : could you please do following: unset the checkbox "Use filters" in Problems view "Filters..." :

image

and bump the workbench "soft" limit from 1000 to 20.000 under Preferences -> General:

image

That should effectively work like the point 2) in the ticket description. I wonder if you see any side effects by doing this. In theory there should be no, except that you will be able to see also 20.001+ problems in the Problems view without changing the limit every time you want to see more.

jukzi commented 1 year ago

Good to have separate issue for this discussion.

This now makes power users angry ;-)

I did not follow the implementation details, So the following statement may be irrelevant if already implemented that way.

For 4.28 please make sure that the new feature is disabled by default and only enabled for views that are known to have no custom limit implementation. For 4.29 i would be happy to see a common feature instead of the hidden hard limit in the problems view if it also offers an option to show more then 1000 items per click. For example if i want to set the filter to 100.000 - which still works - i don't want to click 100 times.

Be extra careful with views that dynamically change their content as the debug View. I can imaging that it's hard to click on a certain line if the view keeps growing/shrinking.

jukzi commented 1 year ago

and bump the workbench "soft" limit from 1000 to 20.000 under Preferences -> General:

How can i apply lower the limits? when i set it to 10.000 i still see all 17.000 problems.

jukzi commented 1 year ago

I like the idea of the new feature, however it does not feel selfexplaining what those numbers mean. Especially the case of only one extra line is contraproductive as it does not save a single line: image VisualVm has a similar feature and i never had a problem to understand their solution: image

iloveeclipse commented 1 year ago

How can i apply lower the limits?

I assumed you want see more, not less?

when i set it to 10.000 i still see all 17.000 problems.

Similar to the "hard" limit that works per group, the "soft" limit works per parent. Does it explain the difference?

VisualVm has a similar feature and i never had a problem to understand their solution

Unfortunately this solution can't be implemented for the existing JFace clients without rewriting lot of their code. We've tried to do something like that but that turned out to be not easily doable.

If you have a concrete proposal how to make current solution easier to understand, please make one (in a dedicated ticket).

Especially the case of only one extra line is contraproductive as it does not save a single line

Agree. Please create dedicated issue for that, should be fairly easy to fix.

jukzi commented 1 year ago

I assumed you want see more, not less?

yes, but i can't test the limit since i once showed all items :-( Also it's a usecase (that i typically do) to try a higher number, feel that it's unusable and the reduce the number again.

iloveeclipse commented 1 year ago

@raghucssit : for M3 please try to check solutions in following order:

If none of the points above would show acceptable user experience, temporarily don't apply "soft limit" on Problems view for 4.29 and do the "perfect" solution in 4.30.

raghucssit commented 1 year ago

ProblemsView updates model and then calls refresh() for a specific project. Incemental display do not dispose the alreday visible items because any random refresh() may dispose already populated items by clicking Show. If the project selection changes then setInput() is called then limited items with Show will be displayed again.

raghucssit commented 1 year ago

Unset "soft" viewer limit in the Problems view if the content limit is higher.

I have tried to solve the above proposal with a modification - "If hard limit is not enabled then setDisplayIncrementally() will be set". This seems to work fine. I will do little more testing tomorrow morning.