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

Memory perf optimizations #184

Merged
merged 6 commits into from
Jan 6, 2025
Merged

Memory perf optimizations #184

merged 6 commits into from
Jan 6, 2025

Conversation

b-fuze
Copy link
Owner

@b-fuze b-fuze commented Jan 6, 2025

Measuring the full Deno docs build we can see the following improvements in memory usage:

Before:

  • 11GiB RAM
  • 3 minutes 29 seconds total time

After:

  • 6.8GiB RAM
  • 1 minutes 30 seconds total time

Memory is taken from Deno.memoryUsage()

This work was the result of memory optimizations to avoid allocating
NamedNodeMap objects when an element only has either `id` or `class`
attributes. If any other attributes are added then a NamedNodeMap gets
allocated.
@b-fuze b-fuze force-pushed the memory-perf-optimizations branch from c094271 to bea231a Compare January 6, 2025 01:09
@b-fuze b-fuze merged commit 83926ac into master Jan 6, 2025
2 checks passed
@b-fuze b-fuze deleted the memory-perf-optimizations branch January 6, 2025 02:14
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.

1 participant