ethereum / remix-project

Remix is a browser-based compiler and IDE that enables users to build Ethereum contracts with Solidity language and to debug transactions.
https://remix-ide.readthedocs.io
MIT License
2.41k stars 916 forks source link

High CPU usage in macOS Ventura 13.3.1 #3713

Open aliasxrus opened 1 year ago

aliasxrus commented 1 year ago

Desktop Remix IDE 1.3.6 (1.3.6.1000) / 1.3.7 (1.3.7) image

Bug in remix-project/libs/remixd/src/services/remixdClient.ts this.watcher = chokidar.watch(path, { depth: 2, ignorePermissionErrors: true })

  1. This dependency checks all files every 100ms.

  2. path - '/'. Checking for file updates works throughout the system. image

  3. Tries request for permissions to access photos, contacts, etc. image image

It is necessary to make it possible to work only with the project directory. Fix method:

  1. Increase time between file polls via interval, binaryInterval https://www.npmjs.com/package/chokidar
  2. Before connecting remixd, ask the user for a working directory and pass it to remixd.
aliasxrus commented 1 year ago

As a temporary solution, you can use this undocumented function for Remix Desktop. Defined path in the ~/.cache_remix_ide/config.json file: {"sharedFolder": "/path to project"}