Just spent months building a high performance UI in React
Just spent months building a high performance UI in React. Instantly responsive against a mock API. Even with Chrome performance at 4x slowdown and 1000 records! Only 150k bundle.🤠
Hooked it up to the real API today.
The real API call takes 7 seconds.
Lots of hot takes. Key takeaways:
1 UI perf work remains worth it. Remember the bundle has to download before API calls begin! And the UI is smooth and responsive once loaded.
2 One need not integrate early to know the real API is slow.
3 Mock APIs can simulate slowness too.
Mock API benefits:
- Iterate on data structures early, using the real UI.
- Simulate different response times.
- Test data edge cases and error responses.
- Run automated tests against static, predicatable, instant responses.
The real problem here is an API being considered “done” when it takes 7 seconds.
Lots of ways to fix that:
-Indexing
-Data warehouse
-Materialized views
-Pagination
-Filtering
-Caching...