AWS-SDK slowing down VSCode

avatar

Borislav Hadzhiev

Tue Feb 09 20211 min read

banner

Photo by Zsofia Szalay

The typescript suggest auto imports setting coupled with AWS-SDK which is 2.7MB minified was slowing down my PC

In the past couple of days I've been experiencing weird CPU spikes while writing code. Not all the time but specifically when I write in typescript and in projects that have aws-sdk installed.

The aws-sdk library is huge - 2.7MB minified, it includes a lot of typings and packages that can be auto imported, so when I type a keystroke I get like 150 suggestions.

The fix that I found is to temporary disable typescript auto import suggestions like:

  "typescript.suggest.autoImports": false

This is not ideal since I rely on the auto imports feature in VSCode.

The next step is for me to migrate to aws-sdk v3 for javascript: Modular AWS SDK, however some of the packages around web identity and token credentials are not implemented yet.

Either way it's good to see that the AWS team is working on improving the developer experience, I had completely written off using aws-sdk on the frontend, however the modular packages will enable me to use more AWS services from the frontend directly, instead of writing useless lambda functions just to save on bundle size.

Join my newsletter

I'll send you 1 email a week with links to all of the articles I've written that week

Buy Me A Coffee