Js-graphql-intellij-plugin: Very bad performance in large .graphqls files

Created on 18 Jan 2019  路  5Comments  路  Source: jimkyndemeyer/js-graphql-intellij-plugin

Version and Environment Details

Ubuntu 16.04
WebStorm 2018.3.2 built Dec 18, 2018
v1.7.2

Expected Behaviour

Can edit large (3000 line) .graphqls file with no performance issues

Actual Behaviour

Typing is limited to around 1 character every ~1.2-1.4 seconds.
No syntax highlighting.
Extremely slow.

Steps to Reproduce / Link to Repo with Reproduction and Instructions

Any large .graphqls file shows this behavior.

v2-alpha v2-architecture

Most helpful comment

Hi Alon.

Sorry to hear that the plugin doesn't scale to your use case.

One of the limitations in v1 is that the text buffer is sent to an external Node.js process for every key stroke to make use of Facebook's reference implementation of GraphQL.

For v2 (see #164) I'm moving to a native parser that runs inside IntelliJ/WebStorm and uses graphql-java for validation etc. I'm currently looking into caching strategies to make it able to handle large projects.

As for the rating of 2 that you left on the JetBrains repository, I'd appreciate it if you could add the reasoning behind that rating on that site. This project, which is completely free as in "free beer" btw, runs almost entirely on my own spare time and motivation to continue doing so, and a low rating without reason behind it doesn't help the project or my willingness to continue spending time on it.

I'll update this issue when the v2 alpha has caching built into to support large schemas. I hope that you'd like to help test it at that time.

Best regards,
Jim.

All 5 comments

Hi Alon.

Sorry to hear that the plugin doesn't scale to your use case.

One of the limitations in v1 is that the text buffer is sent to an external Node.js process for every key stroke to make use of Facebook's reference implementation of GraphQL.

For v2 (see #164) I'm moving to a native parser that runs inside IntelliJ/WebStorm and uses graphql-java for validation etc. I'm currently looking into caching strategies to make it able to handle large projects.

As for the rating of 2 that you left on the JetBrains repository, I'd appreciate it if you could add the reasoning behind that rating on that site. This project, which is completely free as in "free beer" btw, runs almost entirely on my own spare time and motivation to continue doing so, and a low rating without reason behind it doesn't help the project or my willingness to continue spending time on it.

I'll update this issue when the v2 alpha has caching built into to support large schemas. I hope that you'd like to help test it at that time.

Best regards,
Jim.

The latest v2 alpha makes extensive use of caching to support large schemas. See https://github.com/jimkyndemeyer/js-graphql-intellij-plugin/releases/tag/2.0.0-alpha-4 for additional info.

I've seen your post in the main tracking issue for v2, and wow, it's.. fixed, for sure.
It's almost instantaneous, very pleasant to use.
So I went to the plugin repository to put 5 stars for your precious work. If you'd place a donation button on the readme, be sure I'd pay you a drink or two.

@jimkyndemeyer

  1. While your work is commendable, as is your drive, the 2 star rating is not reviewing your work but rather the end product and its usefulness. Sadly, v1 hampers the development of large .graphqls files, instead assisting it.
  2. That being said, I updated the score to 4 stars, and I'll update it further once v2 is released.
  3. I'd love to help testing, and even donate for the sake of continued development.

@toverux Thanks for the support. Happy to hear that the performance improvements helped 馃憤

@advance512 Thanks for the reply. My intention wasn't for you to change the rating, it was simply for you to describe the reasoning behind it. If you'd like to help, please try out the latest alpha linked above, and let me know how you find it. Note that I'm still working on making various UI improvements to make the plugin easier to use, but you should be able to get a sense of the performance characteristics in the latest alpha.

Best regards,
Jim.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

smmoosavi picture smmoosavi  路  3Comments

CarsonF picture CarsonF  路  5Comments

MegaJSDeveloper picture MegaJSDeveloper  路  3Comments

rlancer picture rlancer  路  3Comments

BerndWessels picture BerndWessels  路  5Comments