gregschmit / omake

An extra implementation of make.
MIT License
17 stars 1 forks source link

Improve memory usage of `RuleMap` #5

Closed gregschmit closed 1 year ago

gregschmit commented 1 year ago

Currently, if a rule references multiple targets, the Rule struct (and especially the recipe) is cloned for each target for storage inside the RuleMap, but we should instead store a vector of Rule objects, and reference them by index in the rule_lookup (HashMap). This is possible because rules are never removed from the RuleMap, they are only added during parsing of the makefile.

xadaemon commented 1 year ago

Hey can I have a go at this one?

gregschmit commented 1 year ago

Actually, this was already done in https://github.com/gregschmit/omake/commit/90d9a4ca37bc3f26c9517b05f8024e5d4c29abcd#diff-e20ab5abea76330a07b0062e00fc12b69d47564d35797d48d42098c4475c3f1f I just forgot to close this issue.

But you're more than welcome to contribute; this weekend I can try to spend some time getting my ideas out of my head and into the issue tracker so it's easier for people to see what needs to be done. I scanned the other issues and I don't think there are any others that are already done or being worked on.

xadaemon commented 1 year ago

Actually, this was already done in 90d9a4c#diff-e20ab5abea76330a07b0062e00fc12b69d47564d35797d48d42098c4475c3f1f I just forgot to close this issue.

But you're more than welcome to contribute; this weekend I can try to spend some time getting my ideas out of my head and into the issue tracker so it's easier for people to see what needs to be done. I scanned the other issues and I don't think there are any others that are already done or being worked on.

please do I want to try and help, this project got my interest.