SummerOfCode/2013/newMemoryPage/week2

From MozillaWiki
Jump to: navigation, search

End of Week 2: Report

The second week was spent in attempts at getting the data that the page is supposed to work with. That, in itself, is relatively easy. I just need to figure out what object to query on this myriad of 2000+ lines to get exactly what is needed.

The decision rested on the tradeoffs that would have to be made in

  • getting structured data
  • getting it quickly

If the entire about:memory module is included as an underlay to this addon, then we get beautifully formatted JSON objects with neat values all around. But that also means adding about 2000 Lines Of Code to the codebase. That is huge. On the other hand, we could get that very data, albeit in a very ugly form, from the memory reporters directly. That would mean just 20 additional lines to the codebase, but a number of parsing requirements to get the data to have it in a manageable form.

In that end, it was decided that we'd go with querying the reporters directly -- for now. We will have to return to the same decision if the parsing causes too much of an overhead of its own.


EDIT: In the end, it turned out that this was not really a choice to be made, as we had to implement both approaches side by side