Comments (2)
Honestly there isn't that much that could cause a memory leak in the component since it's basically taking the values of a bunch of inputs and generating an SVG out of them. The one place that is slightly risky is the animation based on requestAnimationFrame
, but if that were leaking, you'd see a spike in CPU usage, rather than a memory leak (see https://github.com/crisbeto/angular-svg-round-progressbar/blob/master/src/lib/round-progress/round-progress.component.ts#L109). There is also some logic that should prevent overlapping animations.
One thing to try is to update to the latest, or at least a later, version of Angular which may contain a fix for your leak.
from angular-svg-round-progressbar.
Thanks for your quick response.
I agree with you, the only part on your code that brought me doubts was the requestAnimationFrame precisely for being a recursive call based on the duration. As for the CPU spike, I was not checking it because the main resource problem was memory related, but it could be.
Following that trail, I have tried reducing the duration to the minimum (1) and the memoy stays in check. In the end, if we are updating the progress every second for a operation in the range of minutes or hours, it is barely noticeable the fancy animation; so is a trade-off we can pay.
Unfortunately the Angular update is something not possible at the moment, but something we look forward for the near future.
from angular-svg-round-progressbar.
Related Issues (20)
- proposed new library HOT 7
- Question: Does v4 break on Angular 9? HOT 5
- [^4.0.0] [Angular 10.0.8] Production build isue. Related to #204 HOT 2
- Animation when max changed
- Errors with Angular 9 - ɵɵFactoryDef HOT 10
- Angular 9 error ɵɵFactoryDef
- Compilation failed after upgrading to 5.0.1 HOT 2
- Could not be served HOT 1
- contribution
- Support for Angular 11 HOT 1
- Small circle at the end of outer stroke
- Filling color in case of 0 current value HOT 1
- Support Angular 12 HOT 1
- Error - Angular 11.2.7 HOT 1
- ARIA progressbar nodes must have an accessible name HOT 1
- error TS2707: Generic type 'ɵɵComponentDeclaration' requires between 7 and 8 type arguments. HOT 2
- Angular 16 support HOT 1
- Angular-svg-round-progressbar for Angular 9? HOT 1
- Inconsistent URL Parsing in resolveColor function affecting SVG Strokes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-svg-round-progressbar.