Huge FPS drops when showing multiple zones on the map
Coremar2 opened this issue · 18 comments
I found this issue with huge fps drops in never versions of Carbonite. I was playing as normal and started to experience lower FPS after some time of playing and when I traveled through The War Within zones. It wasn't happening before the updated versions were available. The drop was quite drastic like from 120 fps to 75 and stayed until I either disabled Carbonite, shown details only(by setting it to show on scale 0.05). Problem with the "showing details" solution is in cities, where these settings are ignored for some reason and the framerate trops again (that might be bug as well? it also ignores transparency). And "showing details only" is just not a solution.
Anyway, I was trying to figure out what was happening and I kinda did, even though I'm not sure if it will help you in fixing it. It looks like som kind of memory leak to me, or the map being called repeatedly or something. It is best explained in included video.(It might be a bit fast with the texts, but I hope it is enough to explain. )
Now I also checked other continents, and it looks like simmilar issue is caused by other maps as well but not as drastic and when you show lot of them. For example when I set maximum to 20 and mouseover the EK, Kalimdor, Northrend, Pandaria, Broken Shore, Draenor, the frame rate IS dropping, until I mouseover just single zone in either Zandalar/Kul Tiras, Shadowlands or Dragon Isles( basically everything since BfA, except for TWW, will stop the "leak". And while there are still 19 other "leaking" zones shown.
So I would say there was something done within the Carbonite with the maps for BfA, Shadowlands, And DF that is stopping such a leak or data calls or whatever. And that could possibly help in fixing this maybe? Unless they messed the maps up within the game itself (I guess the maps are shown directly from gamefiles, right?). All older maps then BfAexperience this behavior.
Also the fps drop persists even when I close the map completely. I have disabled everything in the "Show..." menu. Map update rate is not changing this. I tried to disable everything, no change in the outcome. I also have rather hefty computer and this drop is insanely significant while it also happens with just 6 maps shown.
That's not leak, the cause is that map textures are HUGE. and when you zoom out they eat memory and FPS like hungry horde. Textures were converted for previous addons and will be converted for TWW too, it's work in progress
Also I figured out the stuff with other continents after the video was uploaded so it isn't considered in the video.
As @artscout mentioned those original Blizz maps are huge and displaying them all at the same time is a problem, so that's why i converted them to much smaller. Dragonflight and The War Within are still missing those conversions.
It will help but its still and issue but it cant be resolved completely.
Small workaround is to use zoomed map to show only one zone at a time.
Also showing mining/herb nodes is also a spike to FPS, so if you are not using them at the moment disable them or do same, zoom-in to the zone u are using.
Do u have knowledge in WOW API, LUA and WOW files dumping? Did u made any WOW addons?
I don't thing the size of the map is the case here. If it was, then showing one more even optimized map after the fps drop would make it worse, not fix it completetely (I'm talking here about jump from 14 fps to 100fps). As you might see in the video(closer to the end) showing all TWW maps will cause the drop, adding one more to the display, while still having all those previous maps still shown, will make the fps go back where it should be.
Also, the memory usage is not changing basically at all. I just tested what it does on system/hardware level and it actually makes so the game is using much less resources. And that is actually not what it should be doing, if the size of the map is the culprit.
When those TWW maps are NOT shown, or are shown with one map from e.g Dragonflight, my system is using 9-12% CPU, and around 70% GPU, 18% RAM, and around 30-40% VRAM. and I'm having 100+fps. When I show it so the fps drop is there(14fps without the seventh map added to it) the RAM and VRAM usages are the same, but CPU usage drops to 6% and GPU usage drops to 18%. It is not even waiting for the disk drive as the data are already loaded, it should not be moving data enywhere at this point. It is like the game stops sending draw calls to the GPU.
Even if we are talking about engine limitations, it still should not make such a drastic FPS drop, while showing even one more map(from the converted maps) makes it jump back to normal. Maybe there is some other technical limitation but this still should not be caused by the size of the map texture.
The testing was done with literarly everything disabled, no mining nodes, no POIs, no other addons were enabled, I minimized the amount of detail shown in the map. It is still the same thing. Besides, it does the FPS drop(not spike, but just lower framerate) even when I was just playing, not to 14 fps, but it was still on zoomed in map. And I got 30fps less while still having less resources used.
So if the size of the map texture was the problem, the memory usage should go up, the CPU and GPU usage would go up, but instead memory is staying the same and CPU/GPU is not being utilized as it should. So I really think the problem is somewhere else.
Maybe I'm explaining this wrong due to the language barrier, sorry about that.
Wouldn't that be awesome if users fixed our addons, or even whole video games instead of sending bug reports? :-) Sorry, I don't have that kind of time right now otherwise I would look into it. I'm just here to give a report of my findings. I'm not saying "fix it right now or else...." - I'm not that stupid to expect non commercial projects to be fixed immediately.
still should not be caused by the size of the map texture
But it is... If u read deep down into code of Carbonite u will know how maps are moved and updated, the amount of frames rewritten on update is huge and then rewriting ONE converted zone BLP rather than 150 BLPs makes a difference. Carbonite is not a simple static UI addon and thats a problem...
still should not be caused by the size of the map texture
But it is... If u read deep down into code of Carbonite u will know how maps are moved and updated, the amount of frames rewritten on update is huge and then rewriting ONE converted zone BLP rather than 150 BLPs makes a difference. Carbonite is not a simple static UI addon and thats a problem...
Yes of course that makes a difference, but it is not explaining why showing 6 unconverted zones makes your FPS drop to 14 while showing the exactly same 6 unconverted zones plus 1 converted zone added on top makes it run on 100 again.
I even tried to set the maximum zones to 20 now. I zoomed all out, so I could see all the world maps. Then I went on mousing over and displaying zones first all the TWW maps (fps dropped to 14), then all Draenor zones, then all Broken Isles zones, just until I had all 20 zones shown at the same time...the FPS was 9. Then I moused over one zone from Dragon Isles. So now there are 19 zones that seemed to make the fps drop, displayed and one zone that is fine(the converted one)....Fps jumped from 9 to 65. The 65 FPS is what I expect to be caused by the size of those maps (normally I would have 112 if I had only 1 map shown). Those 9fps are caused by something else.
As I said, I had all zones that makes my game run on 9 fps displayed at the same then I added one more zone and FPS is now 65. All zoomed out.
Loading more data just can't make it run better.
I watched your video and find it strange that you do not understand what's wrong with your question about:
' but it is not explaining why showing 6 unconverted zones makes your FPS drop to 14 while showing the exactly same 6 unconverted zones plus 1 converted zone added on top makes it run on 100 again.'.
But I will explain that to you: when you zooming out 6 unconverted zones they are on the continent that currently active and map update function works on active map. Then you make 1 converted zone active thus moving map update process to that map resulting in normal FPS because those 6 become inactive.
I watched your video and find it strange that you do not understand what's wrong with your question about:
' but it is not explaining why showing 6 unconverted zones makes your FPS drop to 14 while showing the exactly same 6 unconverted zones plus 1 converted zone added on top makes it run on 100 again.'.
But I will explain that to you: when you zooming out 6 unconverted zones they are on the continent that currently active and map update function works on active map. Then you make 1 converted zone active thus moving map update process to that map resulting in normal FPS because those 6 become inactive.
Ok, then how would I set those 6 active again? Because the problem with that explenation is, that it would mean I am unable to move the update process back to those first 6 maps until that one converted map is fully hidden. But even though that one converted map is NOT hidden, those six maps still work exactly as they should as far as I am aware and framerate stays high, yet according to your explenation they are not active nor updating.
If you look at that video in time 1:20, you can clearly see, that I moused over the unconverted zones afterwards, which should make THEM active and drop the FPS, yet the framerate stayed high, until I lovered the maximum to 6, so it would actually hide the one converted map. So unless there is a different bug causing that I can't actually activate the unconverted map after I activated the one that is converted, then there is more to it.
I can also do it the other way around completely. I can show only the one converted map. So it is active and so on. I have around 104 fps. I then mouseover one unconverted zone and it should then move the update to that unconverted map, right? So now I have two shown zones, one is converted and inacive, one is unconverted and active. (and I can clearly see both of those maps). My FPS dropped to around 85, so far it sits within what you just told me, we can both agree with that.
I then continue on showing more unconverted maps until I show all six. So I can now see one converted inacive zone(without the update), and six unconverted active zones, if what you said about moving the update process is correct. (or 1 converted zone on inactive map/continent and 6 unconverted zones on active map/continent to make it more correspond with your wording). Now my FPS is still 85. And these 6 unconverted maps are now fully working as expected(again as far as I'm aware). But, if I set the maximum drawn zones to 6 and do exactly the same, the first map disappears completely from view, when I show all six unconverted maps. So I have only 6 unconverted zones in an active map/continent shown now. And my FPS dropped to 14. So either there is some weird leak/infinite loop that is not happening any time any convered map is visible, not necessarily with active update process. Or moving of the said map update process around those maps is broken (and I believe it is not broken as everything works even when I have high fps and all maps are shown).
I would also believe that closing the whole map frame should also stop the framerate drop.
And also, the FPS drop is not caused by making it eat more memory and being harder to process, as I already said, it makes so the game is not utilizing the hardware properly anymore. So maybe there is just too many API calls and the game is halting the rendering(it actually IS halting the rendering if GPU and CPU utilization drops to nothing), but as I explained with the last paragraph, this "too many API calls" should not have a reason to be happening imho.
Well anyway, I know that something like this would be really hard to track down in the code, more so when you believe that I'm mistaken. And to be honest, I don't actually have that much need for you to fixing this in particular, I am always using the details only and with that I can actually use the highest value ("Detail Graphics Visible Area" set to 40) and see the whole continent without any FPS drop what so ever. Except when I enter the city and the city map also shows the regular zone map above the details and the FPS is suffering from this (The problem is not the city map, but the zone map around).
Yes, I guess when you make them to be converted, the FPS won't drop as much in this case, but I still don't believe making them converted will fully fix the issue I'm talking about on its own. And that is why I was testing this and writing to you about it, so you can presumably fix it completely at some point.
So to end this obviously useless not helping anyone discussion, I was doing this so you can either figure it out and fix it or do whatever you want with that information (Even believe it is not a bug. I still believe it is, but that's up to you, you don't have to explain this to me). I was actually trying to help YOU by doing this. Well thanks to this I just now(while I was writing this) figured out that setting the max drawn zones to 1 will stop city maps from bringing zone maps above the details(too obvious for me to notice before lol), so even though the FPS drop is still there, it is now just 4 frames instead of flat out 30 before this workaround.
Now thanks to you guys adding the detail maps for TWW, it is not as much of issue for me now, so thank you for that.
Now all I actually need is for the city maps to stop ignoring fadeout transparency :-)
U have so much time to write those massive walls of text, maybe just better help ;) I know u mean good but those FPS problems are not new and there are limitations in WOW that cant be skipped.
As those issues are not related to GPU u can have best GPU and CPU and still it will lag because interface between game and addons is not the best and has limitations. Many API calls with Events updates will cause LAGs.
U have so much time to write those massive walls of text, maybe just better help ;) I know u mean good but those FPS problems are not new and there are limitations in WOW that cant be skipped.
As those issues are not related to GPU u can have best GPU and CPU and still it will lag because interface between game and addons is not the best and has limitations. Many API calls with Events updates will cause LAGs.
I didn't have time for it actually, but it was obviously needed. But still took me like 5 minutes anyway.
I will keep this one brief now and it will be the last thing I will write here. I already spent too much time analyzing this for you and explaining it as best as I can, reading through your code(the one I never saw before) would take me much, much longer, so I am not going to do that, it wouldn't be reasonable.
I get it, it might not be worth to fix this particular issue, if all of this is actually skipped by converting those maps and loading them from addon folder. Which I presume it will and that is going to be enough, I guess. But I'm still standing behind my reasoning, that it really was in some cases working completely fine even without the converted textures. So there is the question if looking into it wouldn't make it easier for you in the long run. Maybe it isn't worth it I don't know and I don't need to know.
I didn't come here to argue with you and I can't do more than this, also this is not the way to get more developers. Maybe it would be better just not to react to bug reports then. You apparently didn't need nor cared about me explaining the issue, but still you both pushed back, so I tried to explain it more to prevent misunderstanding. That is all. Now I am going to do something more productive. So see you around
Blizz got many bugs in WOW API interface, some of events are duplicating and even looping them self. Im trying my best to prevent those but its not easy to correct Blizz only by LUA code. U got a good machine and its still dropping what about with those that are on older computers...
This is not 100% my code, many people contributed to this project thorough the years and i really appreciate your trying to explain this problem, but this is known to us and we are fighting it every Blizz update/release. Its starting to be so annoying that Blizz is doing this but, we cant do much about it as to try to find workarounds.
I was thinking of rewriting this whole addon but i got no such time resources available. There is many things that can be done better way nowadays...
As to developers... really there are about 4 people that are caring this project and right now im the only one that got the best knowledge of how what works in Carbonite.