brkalp/fatwoman

Avanza Graph Scrape Optimization

Closed this issue · 3 comments

Currently, the hover functionality scans every pixel across the width of the graph, which is unnecessary since not every pixel contains unique data.

By modifying the algorithm to skip directly to pixels with new data, the process could be significantly accelerated, potentially improving the speed by 3 to 6 times.

This can be achieved by implementing a method for the scraper to detect the difference between the previous value's x position and the new value's x position, and then start to increment the x position by that difference rather than just by 1.

After more investigating, I can say that the new values in the graph aren't uniformly distributed as much as i had thought before. So we may have alter our thinking moving forward with optimizing this functionality.

gerek yok buna bosver

Müthiş