question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VSCode high CPU when browse StyleProvider

See original GitHub issue

Hi, I’ve isolated a weird behavior in my workflow. I’m using : Win10 vscode 1.36.1 RN 0.60.4 Native-base 2.13.4 with theme ejected and up to date As soon as i open the file that containing the styleProvider component and modify it, intellisence goes very slow on all the other files. When i look at my process explorer, it looks like this screenshot above and it never improve before i restart VScode even if i close the problematic file. Task Manager

Here a simple exemple that has the problem :

import React, { Component } from 'react';
import { Root, StyleProvider } from 'native-base';
import getTheme from '../native-base-theme/components';
import platform from '../native-base-theme/variables/platform';
import Main from './Main';
export default class App extends Component {
  constructor(props) {
    super(props);
  }
  render() {
    return (
      <Root>
        <StyleProvider style={getTheme(platform)}>
          <Main />
        </StyleProvider>
      </Root>
    );
  }
}

A workaround is to isolate this piece of code and never open it to keep vscode stable. I’ve no error or warning due to lint/flows/etc… It worked nice before my migration to RN 0.60.4 from RN 0.59.9

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
Aleksanderncommented, Aug 21, 2019

confirm on MacOS: vscode 1.37.1 RN 0.59.9 Native-base 2.13.4

workaroud .vscode/settings.json:

“typescript.disableAutomaticTypeAcquisition”: true

5reactions
budokacommented, Oct 9, 2019

workaroud .vscode/settings.json:

“typescript.disableAutomaticTypeAcquisition”: true

it’s works!

Read more comments on GitHub >

github_iconTop Results From Across the Web

VSCode high CPU when browse Native-base StyleProvider ...
I've isolated a weird behavior in my workflow. I'm using : Win10 pro, Version : 1903, build : 18362.239 vscode 1.36.1. RN 0.60.4....
Read more >
C/C++ extension FAQ - Visual Studio Code
Frequently asked questions about the C/C++ extension in Visual Studio Code.
Read more >
Random High CPU Usage - visual studio code - Stack Overflow
first you need to find which process eating your cpu, for that vscode has inbuilt process Explorer. You can find at Help =>...
Read more >
VS Code using all of the CPUs and how to fix it - Remy Sharp
I've been using VS Code for a lot of years (I tried to work it out), but a problem has been reoccurring over...
Read more >
Visual Studio Code Consumpt high CPU while typing
Now I start next.js project my CPU use 30-40% only if I typing in Visual Studio Code I think it is not normal....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found