Optimization needs to be measurable. You wont notice memory leaks by looking at the code. Instead, you should use profiler, lighthouse and other utilities at hand to find and mitigate performance problems. Unused variables are bad for readability but they hardly have any effect on the performance
Exactly. Unless the unused variables are being constantly re-declared there should be no performance implications. The GC will clear it up from memory pretty quickly.... not that I'm condoning leaving unused variables in your codebase, but I think this is a moot point in terms of performance.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Optimization needs to be measurable. You wont notice memory leaks by looking at the code. Instead, you should use profiler, lighthouse and other utilities at hand to find and mitigate performance problems. Unused variables are bad for readability but they hardly have any effect on the performance
You’re right! I appreciate the feedback! I’ll make sure to add some of your info into the details.
I appreciate the feed back!
Exactly. Unless the unused variables are being constantly re-declared there should be no performance implications. The GC will clear it up from memory pretty quickly.... not that I'm condoning leaving unused variables in your codebase, but I think this is a moot point in terms of performance.