Places:Performance: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
Our history implementation can have a non-trivial impact on the browser's performance, not only when actively browsing history or bookmarks, but also in other areas such as (for example) page load. | Our history implementation can have a non-trivial impact on the browser's performance, not only when actively browsing history or bookmarks, but also in other areas such as (for example) page load. | ||
In the case of page load, one reason for the performance hit is that links must be colored as visited / not visited when displaying a page, which requires going through history (see | In the case of page load, one reason for the performance hit is that links must be colored as visited / not visited when displaying a page, which requires going through history (see [https://bugzilla.mozilla.org/show_bug.cgi?id=329816 Bug #329816]). There may be other performance implications that we do not yet know or anticipate, however (ideas, anyone?). Please update this page as new information (or new doubts/questions) come up. | ||
= Testing Environments = | = Testing Environments = | ||
Line 28: | Line 28: | ||
= Test Data = | = Test Data = | ||
Brett Wilson spent a good chunk of time optimizing Places. This bug has some test data: | Brett Wilson spent a good chunk of time optimizing Places. This bug has some test data: [https://bugzilla.mozilla.org/show_bug.cgi?id=329816 Bug #329816]. Note that he times the IsVisited call directly, as the page load tests have too much noise to be useful. | ||
Dan Mills did some preliminary pageload tests on a limited set of environments and came up with these results: | Dan Mills did some preliminary pageload tests on a limited set of environments and came up with these results: |
Revision as of 02:02, 17 October 2006
Our history implementation can have a non-trivial impact on the browser's performance, not only when actively browsing history or bookmarks, but also in other areas such as (for example) page load.
In the case of page load, one reason for the performance hit is that links must be colored as visited / not visited when displaying a page, which requires going through history (see Bug #329816). There may be other performance implications that we do not yet know or anticipate, however (ideas, anyone?). Please update this page as new information (or new doubts/questions) come up.
Testing Environments
We must run tests on different environments:
- On Firefox 2.
- On Minefield without Places (the current default).
- On Minefield with Places (with --enable-places).
We also need to run tests with these permutations:
- With little or no history data.
- With a medium or average-sized history file.
- With a large amount of history data.
For certain tests, such as pageload, we also want to test with history data which matches few/some/all links in the pageset, and of which the links of the pageset represent a small/large percentage of the history data itself.
Obviously, there are a lot of permutations of the above :-) So the following could be reduced (suggestions welcome here):
- Limit the tests on Firefox 2 to only a few test environments. e.g., only with medium-sized history data which matches some links of the page set.
- Create "no history", "medium history", and "large history" versions of the pageload test, and possibly startup as well. No need to run all the tests on each permutation.
- Run several tests manually, and if there is no significant difference between them, just leave it at that. Possibly we could drop the different "percentage of matching links" veriations, or at least the "percentage of links vs history db size" ones.
- We could drop any of the above if there is strong agreement within the team that it would not be needed.
Test Data
Brett Wilson spent a good chunk of time optimizing Places. This bug has some test data: Bug #329816. Note that he times the IsVisited call directly, as the page load tests have too much noise to be useful.
Dan Mills did some preliminary pageload tests on a limited set of environments and came up with these results:
On Firefox 2 w/ my medium-sized history file (baseline): 249.829
On Minefield:
- No places, medium history: 236.951
- With places, medium history: 233.097
- No places, small history: 228.829
- With places, small history: 237.829