Hacker News new | ask | show | jobs
by piker 246 days ago
This is the solution for that particular issue that Tritium uses.

[NOTE: one dragon would be the memory consumption alluded to in the article.]

1 comments

Could you intern strings? Seems like you're likely to see the same tags and attributes over and over.
Yes, and there are probably a lot of other clever ideas. But the better solution is probably just to implement more of the spec. Once you get through maybe 80% of the tags, you've eliminated 99.9% of the memory issue given their frequency distribution.