TimBurris / SiriusXMPlayer

MIT License
5 stars 2 forks source link

Cache_Data increases in size #1

Open big610 opened 2 years ago

big610 commented 2 years ago

Thank you kindly, I fully agree with your Purpose's. Why have only you been able to come up with a fully Portable Windows App, nobody else? Congratulations serving a need, as the purpose problems have been evident forever.

For your information, have you watched the SiriusXMPlayer.exe.WebView2 Folder increase in size? The SiriusXMPlayer Folder begins at 153 MB. Start the app, adds the SiriusXMPlayer.exe.WebView2 Folder beginning at 12.3 MB. After SIGN IN, watch this folder gradually increase, the longer you play the app. My quick fix is delete the SiriusXMPlayer.exe.WebView2 Folder, causing no harm.
With macOS, when building an app depending on using a browser, I have locked the Cache Folder from increasing it's size, & it works for a mac. I have found & watched where the Window size increase is happening & sure enough, its happening in the EBWebView\Default\Cache\Cache_Data I stop the app, Delete the entire Cache_Data Folder. Also works, no harm, as your just building new data, old not needed. I have Windows Pro, I've checked the box next to Encrypt contents to secure data, in an attempt to lock, fails, continues to build the Cache. Mac locking trick won't work with Windows for me. Still an easy fix, just deleting a folder. A huge gain over the Microsoft Store & Browser. Thank you & for the Portable App, it made it so easy for me to find in one minute. You made the app, not your fault this how the Browser Cache builds & works.

There are two macOS Github SiriusXM apps, both are written differently without browser dependency. One of the developers has discussed with me on separate occasions, he has no Windows unit, but can make available his resources, as he was in the process explaining for me how to do it. I am no where near your lengthy years of talent. I can set up an introduction, for you to think about.

TimBurris commented 2 years ago

Great catch on your part @big610 !

I have added a flag in appSettings.json to clear the cache on Player exit.

While this does seem to work, immediately upon release i realized this needs to be a setting that the end user can toggle more easily than editing the appsettings.json because it turns out the cache actually serves a purpose. If you close the player and reopen it, your player will resume exactly where it was and your ability to rewind/skip will be intact. However, if you clear the cache, you lose that ability.

So i guess it's a trade off, some additional drive space consumption, or the ability to resume your programming where you left off. This is especially handy if listening to a podcast, but also useful for radio stations where you gain to ability to skip past the annoying DJ's chatting about how great their weekend was partying with Band XYZ (that's a hole different gripe that i could spend an hour ranting about šŸ˜„ )

Regardless, I think the ability to clear the cache is absolutely a necessary feature, I truly appreciate you not only identifying the issue, but also saving me the leg work of what folder needs to be cleared and whether or not clearing it would cause application instability (which as you noted, it does not cause issues)

Regarding a non-browser based solution, I think I'm going to go with the browser based option for a while; I really just needed something that would work, I'm not looking to dive into a bigger engagement; I'm already over-committed on side projects šŸ˜ƒ

big610 commented 2 years ago

Thank you. I have the rare Sirius $500 Lifetime Sub, so always testing. You thought it out correctly, to figure out how to write to keep data_0 data_1 data_2 data_3 & index. These five are needed. Notice how they began at 10 MB, now are increasing after stop & re-starting, but not very much in size, requires more testing, time running; but fine trade-off. It was essential you did this, or people end up with gigantic data that needs cleaning, the purpose behind an app or the browser. So fine trade off, these five remember your Log In, resume last station listened to, etc. Where is the Default Yes located, internally? The way you have it set, a normal user needs to do nothing, no toggle.

I'm wondering every time Edge updates, if that internally will update MicrosoftEdgeWebview2Setup 1.3.167.21 to a new version. Will be watching to see how Patch Tuesday handles. And or if I want, could update myself, past experience will run with an old version. I run 99% Portable. I made a Portable MicrosoftEdgeWebview2Setup App, it was over 1 GB and I predicted in advance it would not run, indeed true.

I have Edge turned off with https://www.sordum.org/9312/edge-blocker-v1-7/ all is fine. I tested, uninstalled Edge, doing that I lose Microsoft's Weather in the Task Bar, so re-installed.

Your method using a browser is worth the trade off's so far in testing having to keep MicrosoftEdgeWebview2Setup installed & the performance. I have both Adam & Todd Bruss installed on my macOS, their method no browser involved. Today & on occasion for a few hours, using their apps, Sirius starts chopping in & out the sound &/or nags change to another station, then revert back. These SiriusXM unfortunates continue for a few hours, while other days Sirius is perfect for a few weeks. I switched over to test Windows & your app during the SiriusXM misfortunes, no interruptions, sound perfect, no nags. As you know, can listen to both for a minute, until Sirius detects You're logged in somewhere else. Continue listening on this device.

A few Portable Apps, do not run on first start, common experience, you simply close restart, works on 2nd open. Notice this with 1.1, you might be able to clean up, but is fine with me with your excellent size fix, the trade off value of the Safety of Portable. If too much trouble, state so everyone knows how to run.