Convenience tabular views for HashMap/LinkedHashMap/TreeMap

Questions about YourKit Java Profiler
Post Reply
plethora
Posts: 314
Joined: Thu Jun 02, 2005 8:36 pm

Convenience tabular views for HashMap/LinkedHashMap/TreeMap

Post by plethora »

Sometimes I want to explore the data inside Map instances.
Typically the key and/or value is a primitive or a string.

It would be convenient it YourKit would provide a tabular data view for such objects.
Exploring to CSV would be worth bonus points.

-tt
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Convenience tabular views for HashMap/LinkedHashMap/Tree

Post by Anton Katilin »

Hello,

Thanks for the suggestion.

Could you please clarify: do you want to see a table-like view in reference explorers, with 2 columns - "key" and "value"?

It is technically difficult to place a table inside existing explorer as a cell. Maybe we should use approach like special action for browsing collections as a table, or making it a part of Quick info action/tab, or adding a dedicated slave tab?

Best regards,
Anton
plethora
Posts: 314
Joined: Thu Jun 02, 2005 8:36 pm

Re: Convenience tabular views for HashMap/LinkedHashMap/Tree

Post by plethora »

Hi Anton,

I don't have very clear ideas on UI actually.
If the key and/or value are non-primitive types, if would of course be convenient to easily explore incoming/outgoing references from such a view as well.

Note that the actual Map data might be large, so my main requirement is to be able to handle datasets of 10000+ items.
Exploring to CSV is nice, being able to sort/search by key is nice.

While a dedicated tab sounds like the best approach to me, I'll leave it to you to choose something for a (first) implementation.
It's always possible to request improvements afterwards. Perhaps Alex/limejuice will chime in with some suggestions. :)

Kind regards,
Taras
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Convenience tabular views for HashMap/LinkedHashMap/Tree

Post by Anton Katilin »

Hello Taras
I don't have very clear ideas on UI actually.
If the key and/or value are non-primitive types, if would of course be convenient to easily explore incoming/outgoing references from such a view as well.
Agree.
Note that the actual Map data might be large, so my main requirement is to be able to handle datasets of 10000+ items.
We can solve it similarly to how arrays are shown in explorers, or string representation of objects is implemented in Quick info: show element in particular range, with ability to set the start element and the number of elements to show.
Exploring to CSV is nice, being able to sort/search by key is nice.
Export to CSV can be implemented independently from the presentation in UI, e.g. by adding a popup menu item "Export map" applicable to the currently selected object.

Does this feature make sense alone? I.e., will it be valuable if we implement it first, and then provide special map UI in future builds?
While a dedicated tab sounds like the best approach to me, I'll leave it to you to choose something for a (first) implementation.
It's always possible to request improvements afterwards. Perhaps Alex/limejuice will chime in with some suggestions. :)
Yes, we'll start with something :) I've added a feature request.

Best regards,
Anton
plethora
Posts: 314
Joined: Thu Jun 02, 2005 8:36 pm

Re: Convenience tabular views for HashMap/LinkedHashMap/Tree

Post by plethora »

ConcurrentHashMap would be an obvious candidate as well.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Convenience tabular views for HashMap/LinkedHashMap/Tree

Post by Anton Katilin »

ConcurrentHashMap would be an obvious candidate as well.
Yes.

Could you please share your opinion on my question about CSV export; it is in my previous posting.
plethora
Posts: 314
Joined: Thu Jun 02, 2005 8:36 pm

Re: Convenience tabular views for HashMap/LinkedHashMap/Tree

Post by plethora »

Hi Anton,

For me, the ability to export to CSV would make sense by itself (eg. without a dedicated UI to explore the map content).
I assume that such a feature would use export primitives/boxed primitives/Strings as-is, and would fallback to objectId or such for reference types?

Kind regards,
Taras
plethora
Posts: 314
Joined: Thu Jun 02, 2005 8:36 pm

Re: Convenience tabular views for HashMap/LinkedHashMap/Tree

Post by plethora »

Another good candidate for convenient export/browsing would be trove4j maps.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Convenience tabular views for HashMap/LinkedHashMap/Tree

Post by Anton Katilin »

Sometimes I want to explore the data inside Map instances.
Typically the key and/or value is a primitive or a string.
This functionality was added in 2016.06 EAP.
Post Reply