I'm at a loss here, unsure of what might be causing this issue.
After developing a game engine with webgl, I conducted testing primarily on Firefox where everything ran smoothly without any lag or stuttering, even during more intensive tasks like blending with multiple framebuffers.
However, when I switched over to Chrome, the story changed completely. Chrome struggled to maintain a stable fps, even when running simple tasks. To troubleshoot, I ran an experiment to determine if the issue lied within my code or the requestAnimation loop. Here's the code snippet I used:
<!DOCTYPE html>
<html>
<body>
<div id="fpsCounter"></div>
Lowest fps
<div id="minFps"></div>
<br>
Highest fps
<div id="maxFps"></div>
<script>
// Code Snippet
</script>
</body>
</html>
The code snippet continuously loops the animation frame and displays the fps in a div element. In Firefox, the code performed well, averaging around 58 fps without dropping below 52. However, Chrome struggled to reach 40 fps and frequently dipped below 28. Interestingly, Chrome exhibited occasional bursts of high speeds, reaching a peak of 99 fps, but consistent performance at 60 fps is more crucial.
Additional Details:
Firefox version: 55.0.2 64-bit
Chrome version: 60.0.3112.78 (official version) 64-bit
OS: Ubuntu 16.04 LTS
Ram: 8gb
GPU: gtx 960m
Cpu: intel core i7HQ
Here's a snapshot of Chrome's performance: https://i.sstatic.net/zD70S.png