ponder-sh / ponder

A backend framework for crypto apps

Home Page:https://ponder.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WebStorm - IntelliSense & type evaluation performance issue

duckception opened this issue · comments

Description

Current TypeScript engine of WebStorm and possibly all other JetBrains IDEs struggle with the Virtual type from the @ponder/core package making Ponder basically impossible to work with in those IDEs.

Type evaluation and completions for files that imports anything from the Ponder @/generated namespace makes the IDE consume more than 250% of CPU, especially when trying to get an auto completion for the event strings generated from the ABIs. Auto completion for ponder.on can sometimes take even more than a full minute to load:

CleanShot 2024-03-04 at 00 08 06

This is related to this issue and the JetBrains team is working on a rework for their TypeScript engine which is supposed to resolve this and similar issues.

Interim Solution

Until the Virtual type gets optimized or JetBrains ships the new TypeScript engine, you can install the EAP (Early Access Program) version of WebStorm that ships with an experimental build of the new engine. The instructions how to download this version and turn on the new engine are in the pinned comment in the issue linked above.

While the EAP version contains some bugs, at least Ponder is working fine! ✨