Tejas1510 / Tejas-Website

MIT License
0 stars 1 forks source link

[particle.js] Optimize performance by avoiding ever-growing recursion depth #1

Open paramsiddharth opened 3 years ago

paramsiddharth commented 3 years ago

Description

Inside assets/js/particle.js lies the code for the typewriter effect on the landing page. The code, however, moves through the array of words found in the data-words attributes, and once done, makes a recursive call to entry. This causes infinite recursion, leading to inefficiency.

Solution

Modification of the incrementing strategy of wordsCount i. e. Increment it using modular arithmetic to return to its initial value once all values are iterated over.

If approved, I would like to work on this.

Tejas1510 commented 3 years ago

Go ahead @paramsiddharth