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

[EuiDataGrid] track re-renders from hooks #4294

Closed
chandlerprall opened this issue Nov 20, 2020 · 10 comments
Closed

[EuiDataGrid] track re-renders from hooks #4294

chandlerprall opened this issue Nov 20, 2020 · 10 comments

Comments

@chandlerprall
Copy link
Contributor

The data grid relies heavily on React hooks to maintain/cache various states and values. In many cases it is trivially simple to trigger unnecessary re-computations and re-renders of these hooks. The data grid should be given a new debugPerformance prop that, when enabled, console.logs when various hooks trigger, and ideally can provide a reason.

There are some existing browser/react extensions/hacks that can provide the same or similar information, but requiring setting those up, especially for downstream projects like Kibana, are complicated and time consuming.

@timroes
Copy link
Contributor

timroes commented Nov 25, 2020

Alteranatively we could evaluate using the performance API where it might be more appropriate.

@alexwizp
Copy link
Contributor

@VladLasitsa cannot assign it to you, but could you please take it?

@VladLasitsa
Copy link
Contributor

Ok, I'll take it, but I can't assign it to myself either

@stratoula
Copy link
Contributor

Done 😉

@alexwizp
Copy link
Contributor

I'm just curious why we cannot profiling EuiDataGrid component with the Chrome Performance Tab / DevTools Profiler. It just seems to me that maybe these logs will only annoy the person who really focuses on fixing performance problems.

@chandlerprall
Copy link
Contributor Author

I'm just curious why we cannot profiling EuiDataGrid component with the Chrome Performance Tab / DevTools Profiler. It just seems to me that maybe these logs will only annoy the person who really focuses on fixing performance problems.

With heavy hooks usage for caching computed values, it isn't enough to know when a component re-rendered, but if a useMemo fired. I've added and removed console.logs to the hooks numerous times to try and track down a rendering performance issue, and it would be helpful to have a more permanent solution.

@github-actions
Copy link

👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

@chandlerprall
Copy link
Contributor Author

This is definitely something we still want. Leaving unassigned in case someone else is interested in picking it up before we can get to it.

@cee-chen cee-chen added the help wanted The EUI team is looking for community members to pick up and implement this issue label Mar 6, 2023
@cee-chen cee-chen removed the help wanted The EUI team is looking for community members to pick up and implement this issue label Apr 17, 2023
@github-actions
Copy link

👋 Hi there - this issue hasn't had any activity in 6 months. If the EUI team has not explicitly expressed that this is something on our roadmap, it's unlikely that we'll pick this issue up. We would sincerely appreciate a PR/community contribution if this is something that matters to you! If not, and there is no further activity on this issue for another 6 months (i.e. it's stale for over a year), the issue will be auto-closed.

Copy link

❌ Per our previous message, this issue is auto-closing after having been open and inactive for a year. If you strongly feel this is still a high-priority issue, or are interested in contributing, please leave a comment or open a new issue linking to this one for context.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants