{"push_id":3952907715,"size":1,"distinct_size":1,"ref":"refs/heads/modern-look","head":"9e7b338dcde6f9e65930219248efb1c37211f980","before":"a3cc39fc862aa042448c16a048dbd445d6a42d60","commits":[{"sha":"9e7b338dcde6f9e65930219248efb1c37211f980","author":{"name":"codesupremacist","email":"3c0fbdc464bf92a6d84ec5b844a0d1af915faaca@gmail.com"},"message":"Updated look\n\nInline the `isRef` checks in the various `XRef.fetch` related methods\n\nThe relevant methods are usually not hot enough for these changes to have an easily measurable effect, however there's been a lot of other cases where similiar inlining has helped performance. (And these changes may help offset the changes made in the next patch.)\n\nReplace the `XRef.cache` Array with a Map instead\n\nGiven that the different types of `Stream`s will never be cached, this thus implies that the `XRef.cache` Array will *always* be more-or-less sparse.\nGenerally speaking, the longer the document the more sparse the `XRef.cache` will thus become. For example, looking at the `pdf.pdf` file from the test-suite: The length of the `XRef.cache` Array will be a few hundred thousand elements, with approximately 95% of them being empty.\n\nHence it seems pretty clear that an Array isn't really the best data-structure for this kind of cache, and this patch thus changes it to a Map instead.\n\nThis patch-series was tested using the PDF file from issue 2618, i.e. http://bugzilla-attachments.gnome.org/attachment.cgi?id=226471, with the following manifest file:\n```\n[\n    {  \"id\": \"issue2618\",\n       \"file\": \"../web/pdfs/issue2618.pdf\",\n       \"md5\": \"\",\n       \"rounds\": 200,\n       \"type\": \"eq\"\n    }\n]\n```\n\nwhich gave the following results when comparing this patch-series against the `master` branch:\n```\n-- Grouped By browser, stat --\nbrowser | stat         | Count | Baseline(ms) | Current(ms) | +/- |    %  | Result(P<.05)\n------- | ------------ | ----- | ------------ | ----------- | --- | ----- | -------------\nFirefox | Overall      |   200 |         2736 |        2736 |   1 |  0.02 |\nFirefox | Page Request |   200 |            2 |           2 |   0 | -8.26 |        faster\nFirefox | Rendering    |   200 |         2733 |        2734 |   1 |  0.03 |\n```\n\nFixed findbar icons, dropdown menu, reverted package.json\n\nUnstaged package.json, fixed dropdown width, removed checkboxes from findbar\n\nFixed dropdown menu for rtl\n\nFixed red shadow bug, repositioned button icons\n\nReverted package.json files\n\nFixed dropdownmenu padding\n\nChanged line separator in properties window to match with the rest of the UI","distinct":true,"url":"https://api.github.com/repos/utopianknight/pdf.js/commits/9e7b338dcde6f9e65930219248efb1c37211f980"}]}
{"actor":{"display_login":"utopianknight"}}