Closed Bug 1642780 Opened 4 years ago Closed 3 years ago

EasyEDA PCB designer extremely slow (skia vs. D2D difference in svg paths)

Categories

(Core :: Graphics, defect)

77 Branch
defect

Tracking

()

RESOLVED FIXED
Performance Impact low
Tracking Status
firefox76 --- unaffected
firefox77 --- wontfix

People

(Reporter: kinsispam, Unassigned)

References

Details

(4 keywords)

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0

Steps to reproduce:

  • Update from Stable 76 to Stable 77 (64 Bit, Windows, DE / German)
  • Re-open PCB design that worked fine previously (Stable 76)
  • After manually reverting to 76 again (And modifying the Profiles version so that it is usable) the issue is gone again
  • Restarting Firefox / reloading the page did not resolve the issue

https://easyeda.com/editor

Actual results:

Zooming into the design (Using the tool given function, not Firefox' zoom) causes the site to become virtually unusable (<1 FPS) and stay there until you zoom out again. The further you zoom in the worse it becomes.

Expected results:

No matter the zoom level no performance change should occur.

Has Regression Range: --- → no
Has STR: --- → yes
Keywords: regression
See Also: → 1642415

Can you use the steps in https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Reporting_a_Performance_Problem to obtain a performance profile of the issue?

Flags: needinfo?(kinsispam)
See Also: 1642415

(In reply to Kinsi from comment #0)

  • Re-open PCB design that worked fine previously (Stable 76)

Also, are you able to share a design that reproduces this issue?

Has STR: yes → ---

I've done some more work now:

  • Switched to a new, clean profile, only (addon?) is the profiler addon.
  • Not logged in on EasyEDA
  • It seems to happen with any PCB, I've tested using the "STM8S001J3M3" example available on the landing page
  1. Tested on the (Previously downgraded again) stable 76, working
  2. Updated to 77 again, issue appears again, as you zoom it the site becomes less and less responsive.

I've attached both profiles originatin from the working (76) and faulty (77) version.

Flags: needinfo?(kinsispam)

On an unrelated note: (How) can I hide / change my accounts E-Mail when I used openid to sign in?

Florian, could you help look at these profiles (or find someone who can)?

Flags: needinfo?(florian)
Whiteboard: [qf]

Profile with the bug (Firefox 77) https://share.firefox.dev/2BrEHnn
Profile without the bug (Firefox 76) https://share.firefox.dev/3duN7IT

The time seems to be mostly spent in mozilla::SVGGeometryFrame::GetFrameForPoint. The big difference is that in the Firefox 76 profile this was calling mozilla::gfx::PathSkia::StrokeContainsPoint, and on Firefox 77 it's now calling mozilla::gfx::PathD2D::StrokeContainsPoint.

Flags: needinfo?(florian)

Moving over to gfx land per comment #8.

Component: Untriaged → Graphics
Product: Firefox → Core
Summary: EasyEDA PCB designer extremely slow → EasyEDA PCB designer extremely slow (skia vs. D2D difference in svg paths)

(In reply to Kinsi from comment #6)

On an unrelated note: (How) can I hide

Setting a real name at https://bugzilla.mozilla.org/userprefs.cgi will hide it from users that are not signed in - it would appear you've already done this.

[or] change my accounts E-Mail when I used openid to sign in?

I don't know; you could try asking in the bugzilla.mozilla.org matrix channel, see https://wiki.mozilla.org/Matrix for more details.

:Kinsi , can you provide about:support? And the problem happens with latest nightly? Thanks.

Flags: needinfo?(kinsispam)
Severity: -- → S3
Keywords: perf

about:support's from an empty fresh profile (Where the issue is present) attached (I've removed some information that I deem unnecessary like audio devices)

Regarding nightly: Since I was unable to reproduce the issue using mozregression, I guess not? https://www.reddit.com/r/firefox/comments/gv25bk/here_is_what_is_new_and_changed_in_firefox_770/fso4lfk/

Flags: needinfo?(kinsispam)
Attached file about_support.txt

(In reply to Kinsi from comment #12)

Regarding nightly: Since I was unable to reproduce the issue using mozregression, I guess not? https://www.reddit.com/r/firefox/comments/gv25bk/here_is_what_is_new_and_changed_in_firefox_770/fso4lfk/

mozregression normally uses nightly build. On nightly, WebRender might be enabled. In this case, skia should be used in svg paths. From Attachment 9155143 [details], WebRender was blocked by high monitor refresh rate. It was added by Bug 1638011. It blocks WebRender on release build.

:Kinsi, can you check if the problem is addressed with WebRender? It could be enabled with the following.

  • [1] visit about:config
  • [2] set pref gfx.webrender.all to true
  • [3] restart Firefox.
Flags: needinfo?(kinsispam)

D2D is basically faster than skia with D3D compositor. But some D2D APIs are very slow like ID2D1Geometry::StrokeContainsPoint(). gfx is gradually enabling WebRender. When WebRender is enabled, svg rendering uses skia.

Setting gfx.webrender.all to true does indeed significantly improve the responsiveness. I'm unsure if it matches the performance on release 76 but it is definitely usable and at the very least very close.

Flags: needinfo?(kinsispam)

:aosmond, is there already a bug for unblocking WebRender in release on > 60Hz monitors?

Flags: needinfo?(aosmond)
See Also: → 1638011
Whiteboard: [qf] → [qf:p3:responsiveness]

No bug tracking what is needed for unblocking 60 Hz monitors afaik.

Flags: needinfo?(aosmond)

Although comment 12 suggests that the regression range cannot be investigated using mozregression, if it is still required, I would like to try, but I need more detailed steps to reproduce. Is it still required?

Flags: needinfo?(jbonisteel)

It looks like this issue is fixed by WebRender, although this user had been previously blocked from WR because of blocking on monitor refresh rate. My suggestion is that this waits for the WebRender rollout, as we are continually fixing issues and shipping to more users throughout the year.

Flags: needinfo?(jbonisteel)
QA Whiteboard: [qa-regression-triage]
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Performance Impact: --- → P3
Whiteboard: [qf:p3:responsiveness]
You need to log in before you can comment on or make changes to this bug.