Skip to content

Model view is very slow on Firefox in demo #845

Closed

Description

@gregtatum

Description

Steps to reproduce:

I took a profile here: https://perfht.ml/31EpEhu

It appears the slowness comes from the following area:

https://github.com/GoogleWebComponents/model-viewer/blob/52b15951165bba67c6ea2f36446ffa780952bc50/src/three-components/Renderer.ts#L209-L218

Specifically the call to context.drawImage:
context.drawImage(this.renderer.domElement, 0, this.canvas.height - heightDPR, widthDPR, heightDPR, 0, 0, widthDPR, heightDPR); is very slow in Firefox making the model viewer not very usable.

I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1590515 in Firefox, but wanted to pass it along to this project, as I'm not sure when that will be prioritized.

Live Demo

Browser Affected

  • Chrome
  • Edge
  • Firefox (71-72)
  • Helios
  • IE
  • Safari

OS

  • Android
  • iOS
  • Linux
  • MacOS
  • Windows

Versions

Unknown

Activity

  1. added this to the v0.8.0 milestone on Oct 22, 2019
  2. cdata commented on Oct 22, 2019

    @cdata
    Contributor

    @gregtatum Yes, unfortunately this is something we have been aware of. We also have plans to fix it for various scenarios (#216, #37). I think ideally this particular use case would be addressed by #216. In that case, we would detect that only one <model-viewer> is being used, so we would not bother with the 2D API.

    For context, the reason why we invoke drawImage like that is to get around the browser limitation of number of GL contexts that can be created in one session.

  3. modified the milestones: v0.8.0, on Dec 10, 2019
  4. modified the milestones: , on Jan 6, 2020
  5. modified the milestones: , v0.9.0 on Feb 3, 2020
  6. modified the milestones: v0.9.0, on Feb 11, 2020
  7. modified the milestones: , v0.10.0 on Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions