Closed Bug 1367325 Opened 7 years ago Closed 3 years ago

Drastic performance decrease when working with elements after refreshing a page

Categories

(Remote Protocol :: Marionette, enhancement, P3)

Version 3
enhancement

Tracking

(Not tracked)

RESOLVED WORKSFORME
84 Branch

People

(Reporter: whimboo, Unassigned)

References

Details

(Keywords: perf, pi-marionette-server)

Attachments

(1 file)

Attached file testcase
Originally this got reported via https://github.com/mozilla/geckodriver/issues/729. As it can be seen the time to retrieve elements after reloads of a page increases linear:

** iteration 0 with 1371 elements: 1.21816301346s
** iteration 1 with 1371 elements: 3.68121099472s
** iteration 2 with 1371 elements: 6.05406498909s
** iteration 3 with 1371 elements: 8.95627808571s
** iteration 4 with 1371 elements: 12.4877390862s
** iteration 5 with 1371 elements: 14.9554760456s
** iteration 6 with 1371 elements: 18.0221178532s
** iteration 7 with 1371 elements: 21.0832149982s
** iteration 8 with 1371 elements: 23.2673139572s

I wonder if this is causing the slowness of Marionette unit tests especially for debug builds on slow machines like for Android. Maybe we leak memory too.

I haven't tested yet how this behaves when working with different web pages.
I wrote a little bit about the performance of Marionette’s known web element store in https://github.com/mozilla/geckodriver/issues/729#issuecomment-303792993.
Priority: -- → P3

This problem can no longer be seen since Firefox 84, most likely when enabling our actor implementation by default (bug 1669169), and we actually gained a huge performance boost:

** iteration 0 with 1591 elements: 0.14131402969360352s
** iteration 1 with 1591 elements: 0.10988211631774902s
** iteration 2 with 1591 elements: 0.12004876136779785s
** iteration 3 with 1591 elements: 0.11463093757629395s
** iteration 4 with 1591 elements: 0.11365485191345215s
** iteration 5 with 1591 elements: 0.10502314567565918s

So now it only takes a fraction of the time to retrieve all the requested elements from the page, and that pretty constantly.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
Target Milestone: --- → 84 Branch
Depends on: 1669169
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: