Skip to content
This repository has been archived by the owner on Jan 21, 2023. It is now read-only.

NodeData is unnecessarily large, bloating the size of all Nodes #73

Closed
jdm opened this issue Jul 1, 2020 · 3 comments
Closed

NodeData is unnecessarily large, bloating the size of all Nodes #73

jdm opened this issue Jul 1, 2020 · 3 comments

Comments

@jdm
Copy link
Contributor

jdm commented Jul 1, 2020

mem::size_of::<Node>() reports 120 bytes, and mem::size_of::<NodeData>() makes up 80 of those bytes. If we box most of the variants of the NodeData enum, this can shrink to 56 and 16 bytes respectively.

@jdm jdm changed the title Nodes are unnecessarily large NodeData is unnecessarily large, bloating the size of all Nodes Jul 1, 2020
@jdm
Copy link
Contributor Author

jdm commented Jul 1, 2020

Unfortunately in testcase from servo/html5ever#420 (comment), this only reduces the memory usage by ~450mb. Not nothing, but need to keep investigating where all the memory is going.

@SimonSapin
Copy link
Collaborator

Some discussion in #74 (comment)

@SimonSapin
Copy link
Collaborator

I will soon archive this repository and make it read-only, so this issue will not be addressed: https://github.com/kuchiki-rs/kuchiki#archived

@SimonSapin SimonSapin closed this as not planned Won't fix, can't repro, duplicate, stale Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants