The geographical maps on large installations is unusable

Description

I saw this behavior on Meridian, but should be reproducible on Horizon. I have a copy of the database from the customer who reported the problem.

When clicking on the geo-maps, you can see that it takes some time to load the data from all the nodes with coordinates. But when this is done, it will immediately start retrieving all the data again, and stays on this weird loop until you either close the browser tab, or you are lucky enough to click on another link to get out of the page.

Because of this loading loop, the geo-maps is completely unusable at the moment.

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Alejandro Galue January 11, 2018 at 2:30 PM

Awesome! My pending list is huge, but I'll try to find time to test it (no guarantees).

Jesse White January 11, 2018 at 2:27 PM

1) and 2) are implemented in PR: https://github.com/OpenNMS/opennms/pull/1816

Alejandro Galue January 10, 2018 at 10:15 PM

I like the second approach, assuming it is smart enough to do it only when the page is not being rendered; otherwise we might enter into a similar problem (I think).

What about enable it on demand, and when it is enabled, only refresh the changes, instead of refreshing everything ? (i.e. a combination of both options).

Jesse White January 10, 2018 at 6:21 PM

I was able to reproduce this with the same database, containing about 5000 nodes.

Most of the loading time appears to be on the client side in rendering the actual SVG-based map. During this time the browser's CPU usage spikes, and just when it's done rendering, the refresh causes it to block again.

I can think of a few simple things we can do here:
1) Increase the default refresh rate and make it configurable: https://github.com/OpenNMS/opennms/blob/2d1c8a7ff9b4ce364ebfdd05937675cc474fdd71/features/vaadin-node-maps/src/main/java/org/opennms/features/vaadin/nodemaps/internal/NodeMapsApplication.java#L124

2) Only update the state when the state changes

We unconditionally rebuild the state on refresh here: https://github.com/OpenNMS/opennms/blob/2d1c8a7ff9b4ce364ebfdd05937675cc474fdd71/features/vaadin-node-maps/src/main/java/org/opennms/features/vaadin/nodemaps/internal/NodeMapComponent.java#L151

but could avoid doing this if the objects were not changed.

Alejandro Galue January 2, 2018 at 5:24 PM

Could this be related with the following ?

https://github.com/OpenNMS/opennms/blob/foundation-2017/features/vaadin-node-maps/src/main/java/org/opennms/features/vaadin/nodemaps/internal/NodeMapsApplication.java#L124

I mean, it seems like the page will refresh every 5 seconds, is this correct ? If so, what if it takes more than 5 seconds (maybe minutes) to load all the nodes and all the alarms on the system in order to render the map ? The regional map on the front page (which is implemented in pure JavaScript not Vaadin), takes several seconds to render, so guess that's something to consider.

Fixed

Details

Assignee

Reporter

Labels

Sprint

Affects versions

Priority

PagerDuty

Created December 13, 2017 at 5:03 PM
Updated January 17, 2018 at 3:19 PM
Resolved January 17, 2018 at 3:19 PM

Flag notifications