Skip to content

physics demo performance on android #7135

Closed as not planned
Closed as not planned

Description

@metajack

Currently the physics demo works on desktop and android, but the performance on Android is quite low, although still better than Chrome.

We need to investigate and potentially optimize this.

Note that the framerate counter is offscreen in Servo and can be fixed by adding left: 100px; top: 100px to the #fps rule in the CSS.

Activity

  1. added
    I-perf-slow
    P-android
    on Aug 10, 2015
  2. gordonbrander commented on Aug 10, 2015

    @gordonbrander

    Note that the framerate counter is offscreen in Servo and can be fixed by adding left: 100px; top: 100px to the #fps rule in the CSS.

    @metajack What about left: 0; top: 0;? The initial location of absolute elements is typically where they would have ended up in the flow. If this does not yet work in Servo, left: 0; top: 0; should pin the counter to the top left which is where it lives on other browsers.

  3. gordonbrander commented on Aug 10, 2015

    @gordonbrander

    Currently the physics demo works on desktop and android, but the performance on Android is quite low, although still better than Chrome.

    If we are constrained by the HW, we can reduce the number of particles, or add a toggle that lets us define a workload size.

  4. metajack commented on Aug 10, 2015

    @metajack
    CollaboratorAuthor

    @gordonbrander I think the issue with left and top is that left: 0 and top: 0 are under the Android system toolbar, so it can't be seen. That's a bug in Servo we should probably fix.

    Also I needed to add --device-pixel-ratio 2.0 to the hardcoded startup args for the G Pad since it's high res.

    We hit about 60fps around 25 particles, but we are better than Chrome at most points I measured (1000, 500, 250, 125 and the original 1500). Our performance feels more uneven (lots of 7fps followed by 60fps avging to 20, etc).

  5. metajack commented on Aug 13, 2015

    @metajack
    CollaboratorAuthor

    @pcwalton discovered that Skia was not being built with ARM NEON optimizations at all. Working on a fix for that.

  6. metajack commented on Aug 13, 2015

    @metajack
    CollaboratorAuthor
  7. metajack commented on Aug 14, 2015

    @metajack
    CollaboratorAuthor

    servo/skia#66 has landed, but made little difference in the demos unfortunately. More investigation is needed.

  8. CYBAI commented on Dec 15, 2018

    @CYBAI
    Member

    Got slow perf with the physics demo on my MBP with latest master (c9229f3).
    And the dots even don't move 😂

    default

  9. lumiscosity commented on Jul 28, 2025

    @lumiscosity
    Member

    Comparing Servo built against commit 633d746 with the profiling profile on Arch Linux x86_64 (Intel i7-9700K, NVIDIA GeForce RTX 2070 SUPER) and the production profile (after way too many ugly shims) on Android (Samsung Galaxy S23: Qualcomm SM8550-AC Snapdragon 8 Gen 2, Adreno 740), 35FPS average on PC and 31FPS average on Android, so this is probably fixed now:

    Image Image
  10. jdm commented on Jul 28, 2025

    @jdm
    Member

    Seems reasonable!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

I-perf-slowP-android

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions