Comments (4)
Listening to adError event and then calling loadAds again is the proper way to waterfall through different VAST tags. I am not aware of any memory usage issue when doing so but we will run benchmark when time permits. Can you share your player code configuration so we can try to replicate the issue you are seeing?
from rmp-vast.
I used the autoplay example provided: https://gist.github.com/invalidtask/78efd73f330d9e00427013fe76337b83
from rmp-vast.
So I managed to find some time to look into it further. I used Task Manager from Chrome dev tools for a quick analysis.
I ran the exact code you provided (e.g. make a new ad request every 3s). I used https://www.radiantmediaplayer.com/vast/tags/empty.xml as a VAST tag since your request pertains to repeated ad request made in the instance where no ad inventory is available. I ran test ~ 5 minutes and made a total of 108 ad requets with loadAds API method, taking logs every 30s.
Memory footprint (KB) - JavaScript Memory (Live KB)
73144 - 4879
77128 - 4956
76200 - 5067
74936 - 5200
74036 - 5300
71352 - 5411
73676 - 5554
74916 - 5677
77524 - 5787
79012 - 4971 <--- Chrome automatic garbage collection happened around here
71560 - 5110
69080 - 5124 <--- stop making ad requests
70356 - 5138
70516 - 5152
70560 - 5168
70576 - 5181
As you can see there is not much to wistness about a potential memory leak, while there is indeed signs of a small increase in memory over repeated used of loadAds, the fluctuation in time and automatic garbage collection seem to indicate that this is not an issue for the viewer or Chrome.
from rmp-vast.
I ran another test - this time I am calling a valid VAST tags every 3 empty VAST responses. I ran the test for 10 minutes and made 101 ad request with loadAds (every 4s a call to loadAds is made) in total, taking logs every 30 seconds:
Memory footprint (KB) - JavaScript Memory (Live KB)
55952 - 4880
53692 - 5019
54340 - 5129
54744 - 5184
55444 - 5239
55896 - 5309
54964 - 5405
56360 - 5473
56488 - 5570
55792 - 5639
57780 - 5742
58288 - 5805
58464 - 5034 <--- Chrome automatic garbage collection happened around here
58756 - 5097
59188 - 5187
58240 - 5208
60028 - 5297
60031 - 5044 <--- Chrome automatic garbage collection happened around here
61704 - 5126 <--- stop making ad requests
61956 - 5138
62128 - 5152
62428 - 5164
So far I am not seeing any indication of any significant memory usage issue while repeating using loadAds API method. Closing now.
Feel free to re-open if you have more/different results to provide along with context upon which you obtained those results.
from rmp-vast.
Related Issues (20)
- No way to "preload" Vast Tag without internals force starting it through loadAds() ... break down loadAds() HOT 2
- VAST 3 ad pod skipoffset not working if given as percentage HOT 1
- pause event fired when the ad ends HOT 1
- shaka support HOT 1
- Check for this.container before querySelector call HOT 2
- setMute not working HOT 1
- Can't able to load VAST XML HOT 2
- Support for Mime Types filter HOT 2
- Viewable impression tracker not firing HOT 3
- Insecure mode not working with Latest release of google chrome (Version 91.0.4472.101) HOT 4
- Cannot build with grunt HOT 1
- Rmp player mecanism loading ads depending on screen resolution and not bitrate HOT 6
- Add SIMID support (VPAID replacement) HOT 3
- Is there any way to get VAST_PLAYER (player) object from rmpVast instance ? If not can we expose some method to do so? HOT 1
- Units in VPAID.getAdRemainingTime(), VAST_PLAYER.getCurrentTime(), VAST_PLAYER.getDuration() HOT 1
- Incorrect adVerifications parameters in omsdk.js HOT 1
- Failed to fire an event because of console.dir() HOT 3
- Pause event not firing at all HOT 2
- No event fired when calling the "stopAds()" method HOT 1
- How to allow auto height of the rmp-container HOT 4
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 rmp-vast.