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

Do not use replaceCID if not necessary #106

Merged
merged 2 commits into from
Apr 4, 2024
Merged

Conversation

meain
Copy link
Contributor

@meain meain commented Apr 3, 2024

This PR makes two main changes:

  • If the user provides a CID instead of a name, there is not need to generate a new CID
  • If there are no CIDs to replace, completely avoid calling replaceCID (also avoids few additional allocations)

Follow up to #103

I was trying to speed up the .eml generation and found replaceCID to be a huge bottle neck. Here is a flamegraph of the cpu/execution time. You can see that a major chunk is taken up by replaceCID regexp search.
2024-04-03-17-17-23

@xhit xhit merged commit a5ceaf2 into xhit:master Apr 4, 2024
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants