[Webkit-unassigned] [Bug 43716] Use a HashMap for m_continuation to save memory
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 1 02:58:03 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=43716
--- Comment #11 from Kenichi Ishibashi <bashi at google.com> 2010-09-01 02:58:03 PST ---
(In reply to comment #6)
> Please don't abbreviate continuation to "cont"; abbreviations are harder to read and recognize than words, and can also be confusing and ambiguous. We typically use this style in cases like this:
>
> if (RenderBoxModelObject* continuation = this->continuation()) {
> continuation->destroy();
> setContinuation(0);
> }
Thank you letting me know this. I've fixed it.
> I presume that the motivation for moving the continuation pointer into a map is to save memory. Do you have any data on the memory and performance impact of this change?
Please refer the previous comment. I'm aware that it's not enough, but since there are many factors affecting memory and performance, I couldn't find a way to see the actual effect of the change.
> Instead of forwarding functions, you can use the "using" statement:
>
> using RenderBoxModelObject::continuation;
> using RenderBoxModelObject::setContinuation;
I couldn't use "using" at this time because I defined these functions as protected. The reason of why these functions were defined as protected comes from the inheritance hierarchy. The RenderBlock class isn't derived from RenderBoxModelObject directry; There is RenderBox class between RenderBoxModelObject and RenderBlock, and RenderBox doesn't define these functions. While the code and the hash table should share between RenderBlock and RenderInline (because these are almost the same), it might not be good idea making these functions to be public because RenderBox should not provide these functions. However, I'm not sure why RenderBox doesn't provide these functions, so I'd like to ask your opinions.
> I'm also not entirely sure that having this be a protected function in RenderBoxModelObject that then is made public in both RenderInline and RenderBlock is a helpful design. We may simply want it to be public in RenderBoxModelObject instead. Hyatt can weigh in on that.
As mentioned above, I'd like to ask some advice on that.
Thanks,
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list