Giter Site home page Giter Site logo

Comments (4)

radiantmediaplayer avatar radiantmediaplayer commented on May 29, 2024

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.

invalidtask avatar invalidtask commented on May 29, 2024

I used the autoplay example provided: https://gist.github.com/invalidtask/78efd73f330d9e00427013fe76337b83

from rmp-vast.

radiantmediaplayer avatar radiantmediaplayer commented on May 29, 2024

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.

radiantmediaplayer avatar radiantmediaplayer commented on May 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.