Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Learn More

My startup's webgl app lags in FireFox, unless I profile with screenshots on

  • 1 ответ
  • 0 имеют эту проблему
  • 14 просмотров
  • Последний ответ от TyDraniu

more options

I am a startup founder. I'm making a webgl rendering engine. I'm doing a stress test with 4 large paragraphs amounting to tens of millions of triangles on a macbook air. Firefox is on the latest version.

When I run the app in chrome/safari/opera, the performance is normal. ~45fps. But in Firefox, it's very slow. My FPS counter (in a requestAnimationFrame loop) says ~45fps on all browsers. But in Firefox, even though the counter says that, the real frame rate is ~3-5fps.

When I try to profile, the problem magically goes away and we're back to ~45fps. I played around with profiler settings, and the key determinant is whether or not I'm taking screenshots. No screenshots = slow. Screenshots = fast.

In the flame graph, in slow mode (no screenshots), it seems like I get stuck in the canvasRenderer and the Renderer mostly waits for it. But in fast mode (with screenshots), the canvasRenderer keeps up and the Renderer spents most it's time in: iokit_user_client_trap

I'm not sure what to do. This is only a problem on Firefox. There's some sort of gpu/threads/something that switches when I profile with screenshots that makes it way faster. This performance hit basically ruins my app for Firefox only. Any idea what I should do?

I am a startup founder. I'm making a webgl rendering engine. I'm doing a stress test with 4 large paragraphs amounting to tens of millions of triangles on a macbook air. Firefox is on the latest version. When I run the app in chrome/safari/opera, the performance is normal. ~45fps. But in Firefox, it's very slow. My FPS counter (in a requestAnimationFrame loop) says ~45fps on all browsers. But in Firefox, even though the counter says that, the real frame rate is ~3-5fps. When I try to profile, the problem magically goes away and we're back to ~45fps. I played around with profiler settings, and the key determinant is whether or not I'm taking screenshots. No screenshots = slow. Screenshots = fast. In the flame graph, in slow mode (no screenshots), it seems like I get stuck in the canvasRenderer and the Renderer mostly waits for it. But in fast mode (with screenshots), the canvasRenderer keeps up and the Renderer spents most it's time in: iokit_user_client_trap I'm not sure what to do. This is only a problem on Firefox. There's some sort of gpu/threads/something that switches when I profile with screenshots that makes it way faster. This performance hit basically ruins my app for Firefox only. Any idea what I should do?
Приложенные скриншоты

Все ответы (1)

more options

I guess the best option is to file a bug on https://bugzilla.mozilla.org. Perhaps devs could use your stress test to improve our webgl implementation.

Полезно?

Задать вопрос

Для ответа на сообщения вы должны войти в свою учётную запись. Пожалуйста, задайте новый вопрос, если у вас ещё нет учётной записи.