Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance Improvements #3

Open
museHD opened this issue Jul 26, 2022 · 8 comments
Open

Performance Improvements #3

museHD opened this issue Jul 26, 2022 · 8 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@museHD
Copy link
Owner

museHD commented Jul 26, 2022

Performance should be improved wherever it can be.

Some ways performance can be improved...

  • References to static variables
  • Optimising loops
  • Unnecessary variables
  • etc

Please add observations/errors that can make the website more efficient.

@museHD museHD added help wanted Extra attention is needed good first issue Good for newcomers labels Jul 26, 2022
@yaki3355
Copy link

Hey,

Remove this line:

this,length = 150;

It does nothing.

Line 49 already does the assignment correctly.

@museHD
Copy link
Owner Author

museHD commented Jul 26, 2022

Hi @yaki3355 thank you for your input!
Feel free to submit a PR for the change requested!

Cheers!

@Dun-sin
Copy link

Dun-sin commented Aug 11, 2022

Some variables are declared with var, instead of const or let

@museHD
Copy link
Owner Author

museHD commented Aug 12, 2022

Hi @Dun-sin

Thank you for your response.
Could you please provide a bit more detail as to which function in particular you are looking at or how many changes might need to be made?
Also, how much of a performance difference will this make? I found conflicting answers on the internet regarding the performance difference between var/let/const and looks like they're also dependent on the browser they are running on.
If you think it can make a large difference, could you benchmark the app on your computer and then benchmark it again after the changes to see what the performance difference is?
Also, I'm still learning JS so please point it out if I'm wrong :)

Thanks!

@Dun-sin
Copy link

Dun-sin commented Aug 12, 2022

Hi @Dun-sin

Thank you for your response. Could you please provide a bit more detail as to which function in particular you are looking at or how many changes might need to be made? Also, how much of a performance difference will this make? I found conflicting answers on the internet regarding the performance difference between var/let/const and looks like they're also dependent on the browser they are running on. If you think it can make a large difference, could you benchmark the app on your computer and then benchmark it again after the changes to see what the performance difference is? Also, I'm still learning JS so please point it out if I'm wrong :)

Thanks!

With the latest Javascript version, var was replaced with let and const because they are more save(security wise) and help avoid bugs that can lead to other problems

@museHD
Copy link
Owner Author

museHD commented Aug 14, 2022

Ok, are you able to benchmark it with the current version and new changes and see how the performance changes?

@Dun-sin
Copy link

Dun-sin commented Aug 14, 2022

Ok, are you able to benchmark it with the current version and new changes and see how the performance changes?

Nope

@museHD
Copy link
Owner Author

museHD commented Aug 14, 2022

Ok if anyone else is interested in taking this up please let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants