-
Notifications
You must be signed in to change notification settings - Fork 138
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
Rewrite "React Queued Renders" panel for better perf, and make clear it's experimental #9775
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
ad43bc2
to
6b6a8ec
Compare
6b6a8ec
to
1fc9fd8
Compare
@@ -187,6 +188,18 @@ export const sourcesByIdCache = createSingleEntryCache< | |||
}, | |||
}); | |||
|
|||
export const sourcesByPartialUrlCache: Cache< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kind of a nit: This cache feels a bit unnecessary. Seems like we could useMemo
or in some other way cache the result of this filter action without adding a whole new cache for it. We're really only using it to look for a single file anyway (react-dom).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's being used for react-dom
, but the call is inside of a couple different caches, and I've got a spot in the follow-up PR that I just noticed ought to be using this for Redux files as well.
updateMappedLocation(sources, functionLocation); | ||
|
||
const location = getPreferredLocation(sourcesState, functionLocation); | ||
// const { functionLocation } = fnPreview; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// const { functionLocation } = fnPreview; |
import { useAppDispatch, useAppSelector } from "ui/setup/hooks"; | ||
|
||
import cardsListStyles from "ui/components/Comments/CommentCardsList.module.css"; | ||
import styles from "ui/components/Events/Event.module.css"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems pretty fragile for this component to import styles from other packages. We don't have TypeScript checking us there so it seems we're likely to "break" the React styles by changes made in these other CSS files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. This was me trying to get something that looked passably decent, as quickly as possible (and an example of why I was saying we could start extracting some reusable components or styles).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should copy/fork the styles for now.
flex-direction: column; | ||
padding: 0; | ||
overflow: auto; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we delete this file? Seems like nothing is referencing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It gets used in the follow-on PR - got accidentally included here as I was trying to split up the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kill it from this PR?
- Fixed duplicate state update entries - Removed unused-in-this-PR CSS file - Copied needed styles to a new file - Added fetching of function details to each frame
4201898
to
5bafddf
Compare
a2e31a6
to
e94541d
Compare
e94541d
to
9a60782
Compare
This PR:
<ReactPanel>
changes are in this PR. The<ReactReduxPerfPanel>
changes will go in a follow-up stacked PR.packages/replay-experimental
folder by configuring TS and import sorting<ReactPanel>
to improve loading perf and rendering behavior:getPointStack
instead ofgetAllFrames
for faster stack trace datascheduleUpdateOnFiber
sourcesById
cache instead of Redux sources staterender()
from the backend routines logic<ReactPanel>
component and all associated Suspense caches over toreplay-experimental
, to clarify that this logic is not production-ready yetFuture Work
There's a lot of things I've proved that I can do that are not in the current version of this PR: