pnp / List-Formatting

List Formatting Samples for use in SharePoint and Microsoft Lists
https://pnp.github.io/List-Formatting/
MIT License
1.78k stars 853 forks source link

customCardProps degrading performance on page #567

Closed joshuaKingNav closed 1 year ago

joshuaKingNav commented 2 years ago

Hi all,

I hope this is the appropriate place to raise this.

Has anyone else noticed huge performance issues with customCardProps (CCP) JSON formatting recently? I'm not sure what has changed as this feature hasn't caused me issues in the past and seems to have occured within the last few days.

From opening/refreshing page showing a SharePoint list, performance degrades each time a CCP is displayed, to the point of completely hanging the page - entire page is unresponsive, browser presents "wait or exit page" prompt.

I originally noticed this issue in a large list with a lot of columns, several rows, and a lot of complex JSON formatting. I thought it might have just simply been the complexity of the list, so spun up a new, blank list on a different site, with 1 column, 1 row, and 1 div element with a CCP that presents a simple string inside it, and experienced the same problem.

Column formatting for my simple, repeatable test below. It takes 10-15 times of hovering and moving the mouse away, but gradually, each presentation of the CCP gets slower and slower, and at some point the whole page just hangs.

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "children": [ { "elmType": "div", "txtContent": "Hover over me!", "customCardProps": { "openOnEvent": "hover", "formatter": { "elmType": "div", "txtContent": "hover text" } } } ] }

Additionally, I've had colleagues test on their machine against the same list, tried in different browsers, cleared my browser data, tried in incognito windows, etc.

tecchan1107 commented 1 year ago

Sorry for the delay in commenting.

I think I had the same phenomenon last year. It seems to be fixed now. image

If you are still experiencing the same problem, I am sorry, but I believe it is a bug in SharePoint (Microsoft Lists), please create a new issue at the following link. https://github.com/SharePoint/sp-dev-docs