Trying Million Lint
I learned about Million.dev and decided to give it a try.
About Million.js
This library seems to make profiling easier than using React DevTools' Profiler. Profiling performance is usually a cumbersome and time-consuming task. If this can make it easier, I was quite excited about the prospects.
Here's a quote from the official site about Million.js:
Million Lint is a VSCode extension that keeps your React website fast. We identify slow code and provide suggestions to fix it. It’s like ESLint, but for performance!
※ https://million.dev/blog/lint
It's used as a VSCode extension.
Trying It Out
The process to try Million Lint was very simple. Just running the following command automatically installs it.
npx @million/lint@latest
After installation, upon starting the application and performing some operations, information like render count and render time were always displayed in VSCode. In addition, as a paid option, you can receive suggestions for solving problems identified by Lint. For example, there were advices like "Please use a callback function" or "Please debounce". However, the free usage seemed to be limited to about three times.
Thoughts
At this point, I think I would still use React DevTools for performance investigation. The analysis feature of Million Lint is paid, and the output of suggestions was not stable (sometimes suggestions were displayed, sometimes not). Also, while I could see the rendering and performance data for parent components, these details were not displayed for child components.
However, being able to grasp rendering and processing times on VSCode might give an opportunity to notice performance issues before facing them. The suggestions from Million Lint are paid, but the feature that displays information about rendering and time seems to be worth using.
In Conclusion
When developing with React, it's common to face performance issues, and Million Lint could potentially help in addressing them. However, it's important to be aware that full utilization of its features requires payment, and there are limitations to the free version.
Share
Related tags
- Trying Out container-structure-test on a Docker Image
- Integration Testing for Next.js and DB using Testcontainers
- Trying the Playwright Component Test
- I want to do Document Testing with Typescript
- How to Mock tRPC Communication on Storybook with MSW
- E2E Testing with Cucumber and Screenplay Design
- Comprehensive Testing Pattern Guide for Web Frontend
- Mockable unit testing methodology completed only with BigQuery
- Trying ArchUnit with Typescript
- Investigated and Summarized Testing Perspectives for Web Apps (25 Selections)
- I want to test with Google Apps Script too! (Clasp + Typescript + Jest)
- Things to Keep in Mind When Writing Unit Tests
- Continuously Monitor Visual Regression Tests with CircleCI + BackstopJS (Puppeteer)