4

My computer seems to get more ane more trouble to handle the React part of my project, 16go ram doesn't seem enough to keep the project's reload fluid. (Actually had to hard reboot the computer a few minutes ago because of total freeze)

I don't know if this is because of Material-UI, the project being to big or me not having done something, even though I have my suspicions about MUI. I had to switch to Visual Studio Code (really nice IDE once the basic plugins are installed btw), but dude seems to have hard times too.

Is there a limit to how big a React handled project should be? Am I fucking something up?

Comments
  • 2
    You know something is not right when you cant run a website with 16gigs of ram
  • 0
    I work on a 8gb laptop with 2.X GHz quadcore, the dom's depth is about 30 and firefox is pretty much fluid. I rarely encounter small freezes.
  • 1
    @BindView a memory leak maybe? We might have one in our react-application (dunno if that applies to prod too)
  • 0
    @BindView @YouAreAPIRate the website runs more than okay, but it's the compilation that freezes everything

    I have a back-side part that sweats bullets when compiled while the front-side has no problems getting compiled, but that's far from being as complex as the backend

    I don't know if having memory problem while compiling is a common problem 😅😅
  • 3
    Try to use the same stack, but on empty project. Does it behave the same?

    If it does, strip your stack part after part until you bust the one that fucked up your performance. Fire the github issue then.

    If it doesn't, check your code for circular reference, I had a problem with that once
  • 0
    @uyouthe I'm still pretty noobie to understand the whole thing with React, like, I'm still unsure about the consequences of my code.
    I guess I'll spend 2 or 3 evenings breakings everything and rebuilding it bit by bit. I just don't believe that ONE thing makes the problem on its own but several at the same time (even though it'd be great if it was the case)
  • 2
    @Drillan767 it often happens because of just one thing somewhere.
  • 0
    @uyouthe I spoke to a colleague, I didn't use shouldComponentUpdate(), and my components are pretty badly nested (my DOM is too big at some places)

    I think a few problems can come from here
  • 1
    @uyouthe I started to rebuild the whole mess, that was one of the best idea I got this month! I did a fucking mess, now I'm cleaning up and dividing to child components as much as I can, and React really seems to be pleased by this :')

    Also, I decided to go full Single Page Application with React Router and to add some shouldComponentUpdate() at some critical nodes, and it's doing miracles, where I used to have 4 logs results for one console.log() written, I now have only... one. No more freezing, this is such a bliss *.*
  • 2
Add Comment