RESOLVED FIXED 7775
KJS::Node and KJS::StatementNode are bigger than they need to be
https://bugs.webkit.org/show_bug.cgi?id=7775
Summary KJS::Node and KJS::StatementNode are bigger than they need to be
Maciej Stachowiak
Reported 2006-03-14 23:10:38 PST
KJS::Node and KJS::StatementNode are bigger than they need to be. Many fields could be removed entirely, or the info could be stored elsewhere more efficiently.
Attachments
this could reduce memory use by a decent chunk for big widgets (32.34 KB, patch)
2006-03-14 23:12 PST, Maciej Stachowiak
andersca: review+
Maciej Stachowiak
Comment 1 2006-03-14 23:12:49 PST
Created attachment 7075 [details] this could reduce memory use by a decent chunk for big widgets
Maciej Stachowiak
Comment 2 2006-03-14 23:15:49 PST
Anders Carlsson
Comment 3 2006-03-14 23:34:30 PST
Comment on attachment 7075 [details] this could reduce memory use by a decent chunk for big widgets Just two small comments: + (KJS::StatementNode::lastLine): Renamed l1 to m_line this should be m_lastLine + int m_lastLine;; has an extra semi-colon. Otherwise, looks great!
Darin Adler
Comment 4 2006-03-15 09:36:42 PST
Comment on attachment 7075 [details] this could reduce memory use by a decent chunk for big widgets I'd like to see more consistency assertions. For example, an assertion that a node is either in newNodes or nodeExtraRefCounts but not both. An assertion in Node::deref that the node is not in newNodes. An assertion in clearNewNodes that none of the nodes in newNodes are also in nodeExtraRefCounts. None of these are likely to immediately find a problem, but I'd like to have those. Instead of implementing Node::refcount() I think you should have removed the function. I can't find a single caller. I'm surprised by the use of "unsigned int". Do we use "unsigned" or "unsigned int", idiomatically? Very nice stuff. I'd been wondering for a long time why every single object needed a source URL and this seems a good solution.
Note You need to log in before you can comment on or make changes to this bug.