-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix: Only highlight first term after heading [INGEST-1262] #5346
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
||
let insideCustomLink = false; | ||
|
||
const alreadyExplained = {}; | ||
|
||
const newChildren = []; |
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.
When I made the initial change, the build never terminated. I had to run Instruments.app against gatsby to figure that most of the time was spent in array splicing. Fixing this gross misuse of datastructures made the build terminate again.
It seems that the second-heaviest stacktrace is about regex replacements. Will create a followup PR.
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.
sike, the thing i wanted to do doesn't actually have an impact (explicit precompiling of regexes). I think we would want to spend some time thinking about how to make gatsby-remark-variables faster, which I think is dominating our build times. cc @dcramer
In one of our discussions, you suggested highlighting the first instance after each heading, and I thought that was a good idea, so that's what I thought we were doing. Is that a hard change to make at this point? Also, I didn't realize that doing this based on paragraphs would mean that any other type of text (e.g., text in lists or tables) wouldn't use the highlighting (see the word "quota"): |
I completely forgot, I was messing around with multiple versions of this due to performance problems, but yeah that's what we agreed on. Fixed.
That's a bug I introduced, also fixed. |
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.
Looks good! Thanks for getting this into the quarter!
No description provided.