apollo-client-devtools icon indicating copy to clipboard operation
apollo-client-devtools copied to clipboard

v3 Plugin becomes very slow and even lags on large schema

Open kevinmu opened this issue 4 years ago • 7 comments

Intended outcome: In the previous version of the Apollo Client Devtools Chrome plugin (I guess v2?), I could type and run queries pretty quickly; there was no visible lag. Of course the introspection query did take some time to populate, but that was okay. Auto-suggestions worked quickly.

Actual outcome: In this new version, even typing queries into the workspace becomes a challenge. Constant lagging (registering my keystrokes a second or two after I enter them), sometimes even freezing the Chrome window I'm working in.

How to reproduce the issue: Happens every time I try to use the devtools. I am working with a fairly large schema (schema.json is 6.5MB for reference), but it was working fine before the upgrade to v3.

Desktop (please complete the following information):

  • OS: Ubuntu 18.04
  • Browser: Chrome
  • Browser version: Chrome Version 89.0.4389.90 (Official Build) (64-bit)
  • Extension version: 3.0.2

kevinmu avatar Mar 30 '21 05:03 kevinmu

@kevinmu can you try with 3.0.5 and let us know if this is still happening? Thanks!

hwillson avatar May 02 '21 18:05 hwillson

I'm having this as well on 3.0.5 with Firefox, as are my teammates on their platforms.

There also seems to be a memory leak, since my browser just got oomkilled because of this:

May  7 17:23:13 nyarlathotep kernel: [ 9341.066780] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/[email protected],task=firefox,pid=4453,uid=1000
May  7 17:23:13 nyarlathotep kernel: [ 9341.066895] Out of memory: Killed process 4453 (firefox) total-vm:29646444kB, anon-rss:19505944kB, file-rss:0kB, shmem-rss:117612kB, UID:1000 pgtables:43808kB oom_score_adj:0
May  7 17:23:14 nyarlathotep kernel: [ 9341.628176] oom_reaper: reaped process 4453 (firefox), now anon-rss:0kB, file-rss:0kB, shmem-rss:116804kB
  • OS: Ubuntu 20.10
  • Browser: Firefox
  • Browser version: 88.0
  • Extension version: 3.0.5

For comparison, our schema.json is 21 MB.

alechartung avatar May 07 '21 22:05 alechartung

As a data point, I've observed slowness with version 3.0.5 of the extension on two setups:

  1. Ubuntu 18.04 LTS with Firefox 90.0 (so slow the computer becomes unresponsive)
  2. macOS 10.14 with Chrome 91.0

My schema is about 4.5 MB.

ararslan avatar Jul 20 '21 19:07 ararslan

Since this issue was opened, a new major version of the devtools were released. If anyone has more recent info in the way of a reproduction, I'd be happy to re-open this issue, but for now I'll close it out. Thanks!

alessbell avatar Sep 05 '23 23:09 alessbell

This is still an issue for me (v4.4.1), especially on the Cache window. There is noticeable lag when clicking elements and even hover overs. If I try to interact with the tool for more than a few minutes the Chrome debugger will crash (or force a breakpoint, which was odd).

Our schema is fairly large, though I haven't tested against a control to determine if this is relevant.

JeffJankowski avatar Feb 06 '24 07:02 JeffJankowski

Reopening this since it's still occurring. Thanks for the comment, @JeffJankowski - if you're able to share the size of the schema.json you're working with it would be a useful data point to add to the ones above. Thanks!

alessbell avatar Feb 06 '24 22:02 alessbell

@alessbell Our schema.json is ~15MB

OS: Windows 10 Pro Browser: Chrome Browser version: 121.0.6167.140 (Official Build) (64-bit)

JeffJankowski avatar Feb 07 '24 20:02 JeffJankowski