Just imagine, there is a map where enemy units are periodically created, adn then they die in fight vs the player. And perfomance is slowly going down after every waves. Fps is about 100 at start and about 15 when hundreds of enemy units are dead. Almost nothing changed, player still has the same amount of units, maybe a little more then at start, but not as more to drop fps from 100 to 15.
I'm trying to realize, what affects this? Units created by triggers, then they die. I checked for "dead" units, but found none. So, looks like there shouldn't be any perfomance consuming objects left. Why then the game lose fps? Any ideas?
Do you have a large amount of buildings drawn in the fog with an image? These lower the FPS, too and can be hidden via opacity actor messages send by trigger. That greatly improved the performance of my map.
Do you create persistent effects that you aren't removing?
Are you creating text tags that you aren't removing?
Are you creating dialogs that you aren't removing?
It shouldn't be the unit amount on the map as you already checked the amount of dead and alive units.
Have to ask about the Create Persistent effects, do you have to destroy every create persistent that you create? I was under the impression it auto-destructed after it had done all its tick effects. Am I wrong in this thinking? If so there is a great many lags for me to remedy in my mod if this is so.
Do you have a large amount of buildings drawn in the fog with an image? These lower the FPS, too and can be hidden via opacity actor messages send by trigger. That greatly improved the performance of my map.
Yeah, I read your thread, and made some arrangements, and it helped a bit, but it wasn't the main source of lags.
1. Do you create persistent effects that you aren't removing?
2. Are you creating text tags that you aren't removing?
3. Are you creating dialogs that you aren't removing?
1. If I have an explicit amount of periods in a persisten, can I be sure it removes itself after the last period ends?
2. This is an interesting question. Maybe it's the reason. Which trigger sets time before the text tag remove itself? Looks like I only set fade duration:
@Zolden: Go
Text tags don't destroy themselves after fading afaIk. You need to create a thread with your text tag as a parameter and the time before they are destroyed.
The thread limit is 2048 in the 1.5 beta I think.
@Zolden: Go Text tags don't destroy themselves after fading afaIk. You need to create a thread with your text tag as a parameter and the time before they are destroyed.
The thread limit is 2048 in the 1.5 beta I think.
while units die, he animations playing on a large scale will lag you terribly.
Also make sure the units actors go away when the animation is finished. otherwise you will see dead bodies everywhere.
It puts the code into a trigger and executes it in a thread. And it helps to avoid waiting in the main function until the Wait() function finish its pause job. Going to test it now.
Why are you posting galaxy script even though you obviously use GUI to code?
Right click on a line in a gui trigger/func/action and select "select all", then just right-click again and select "copy as text".
PS: The text tag thingy will most likely not fix your lag issue. After checking the trigger debug window (for triggers going crazy or trigger-threads that build up) id probably go for actor problems (like not destroyed actors) or other stuff in data that doesnt get removed properly.
Sadly there seems to be no way of monitoring what happens in the data part of the editor, so its pretty hard to find out if smth is building up over time. If anyone knows a way to monitor data stuff id be very interrested in that.
Why are you posting galaxy script even though you obviously use GUI to code? Right click on a line in a gui trigger/func/action and select "select all", then just right-click again and select "copy as text".
It's the only way to communicate for me, because first, my editor is translated, and second, it translated not perfect. So, oonly galaxy code is something I share with everyone. Also, I was curious myself, so just shared what I realized.
PS: The text tag thingy will most likely not fix your lag issue. After checking the trigger debug window (for triggers going crazy or trigger-threads that build up) id probably go for actor problems (like not destroyed actors) or other stuff in data that doesnt get removed properly.
Yes, I'll check it after I finish woth text tags. Because 1-2K of undestroyed text tags must definitely consume some noticable amount of perfomance.
@Mille25: Go
You can remove all effects with a trigger action. So you can check, if removing effects on the whole map raises the FPS or not. So obvious problems can be identified with that.
Wow thanks. My tower sell trigger was leaking an actor each time. Over the course of a game there could be 1000+ sells. I wonder how much performance improvement I'll get now that I fixed it.
It's the only way to communicate for me, because first, my editor is translated, and second, it translated not perfect. So, oonly galaxy code is something I share with everyone. Also, I was curious myself, so just shared what I realized.
Personally i would try to get the english version of the game, at least for map editing. I remember that the german version was horrible and i couldnt work with it, since it was poorly translated and it just felt weird to code in another language than english.
You should be able to download the english version from battle.net officially. (At least i remember doing this when the game released bevore i got my US account, im sure its still possible)
Quote:
Ok, after some tests I can say that undestroyed text tags were definitely the main source of lags. Thanks, Ahli.
Interresting. So you did set the lifetime of all texttags to X but they didnt get destroyed?
I did some research yesterday, but the GUI had like 0 information about lifetime vs destroy, i also couldnt find anything in the natives.galaxy.
Im glad that i decided to destroy all text tags in SCU even though they have a lifetime since i wasnt sure, haha.
I also tried to find out whether they get destroyed or not with a simple test trigger, but strangely the variable didnt go "null", no matter if i changed the lifetime or destroyed the text tag. On the other side i also wasnt able to show the text tag again once its lifetime expired, even though the variable wasnt null.
Since i couldnt find any difference in behavior i assumed that lifetime automatically destroys the TT after fading.
Personally i would try to get the english version of the game
Yes, I had to. Now it's too late. I got used to the russian one. And I fully understand its imperfect translation. Don't want to spend more time to relearn and feeling super noob :)
Interresting. So you did set the lifetime of all texttags to X but they didnt get destroyed?
I'd like to set a lifetime. But there were notching close to lifetime amongst text tag related triggers I found. I set fade time, thinking it will remove 'em, but no, it never did.
I did some research yesterday, but the GUI had like 0 information about lifetime vs destroy, i also couldnt find anything in the natives.galaxy. Im glad that i decided to destroy all text tags in SCU even though they have a lifetime since i wasnt sure, haha.
I also tried to find out whether they get destroyed or not with a simple test trigger, but strangely the variable didnt go "null", no matter if i changed the lifetime or destroyed the text tag. On the other side i also wasnt able to show the text tag again once its lifetime expired, even though the variable wasnt null.
Since i couldnt find any difference in behavior i assumed that lifetime automatically destroys the TT after fading.
Yes, these results would make me think that that lifetime thing removes them. Maybe one more test could make it even more explicit. Just create like 5K of text tags with lifetime. It will drop the fps. Then check, if fps return back to high level after the lifetime got expired.
This seems to destroy the text tag entirely, the FPS go to 100% after 10000 Text Tags get created and faded out.
Thats why im so surprised that destroying fixed your lag issues, since as far as i had understood it you already used the duration thingy for your tags.
EDIT: I think i see the problem. You set the "Fade Duration", but not the "Duration". Duration fades the tag aswell though and destroys it properly.
Just imagine, there is a map where enemy units are periodically created, adn then they die in fight vs the player. And perfomance is slowly going down after every waves. Fps is about 100 at start and about 15 when hundreds of enemy units are dead. Almost nothing changed, player still has the same amount of units, maybe a little more then at start, but not as more to drop fps from 100 to 15.
I'm trying to realize, what affects this? Units created by triggers, then they die. I checked for "dead" units, but found none. So, looks like there shouldn't be any perfomance consuming objects left. Why then the game lose fps? Any ideas?
Do you use any custom-made units? If so, check if all actors are destroyed on death. Somebody already had a similar problem.
Interesting. Too bad there is not a way to check for orphaned actors?
@Karawasa: Go
If you think there is no way to get a list of created actors, check the debug commands.
Do you have a large amount of buildings drawn in the fog with an image? These lower the FPS, too and can be hidden via opacity actor messages send by trigger. That greatly improved the performance of my map.
Do you create persistent effects that you aren't removing?
Are you creating text tags that you aren't removing?
Are you creating dialogs that you aren't removing?
It shouldn't be the unit amount on the map as you already checked the amount of dead and alive units.
@Ahli634: Go
Have to ask about the Create Persistent effects, do you have to destroy every create persistent that you create? I was under the impression it auto-destructed after it had done all its tick effects. Am I wrong in this thinking? If so there is a great many lags for me to remedy in my mod if this is so.
@Deadzergling: Go It will destroy itself unless you check the Persist Until Destroyed flag.
yes, have some. Ty, going to check it.
Oh, cool, it's what I need to use!
Yeah, I read your thread, and made some arrangements, and it helped a bit, but it wasn't the main source of lags.
1. If I have an explicit amount of periods in a persisten, can I be sure it removes itself after the last period ends?
2. This is an interesting question. Maybe it's the reason. Which trigger sets time before the text tag remove itself? Looks like I only set fade duration:
3. Think there is everything's with the dialogs.
@Zolden: Go Text tags don't destroy themselves after fading afaIk. You need to create a thread with your text tag as a parameter and the time before they are destroyed.
The thread limit is 2048 in the 1.5 beta I think.
What's thread? Something like this?
while units die, he animations playing on a large scale will lag you terribly. Also make sure the units actors go away when the animation is finished. otherwise you will see dead bodies everywhere.
@Zolden: Go
yes. Just let it create a thread. I'm using the GUI, so I don't know how to do that in galaxy. ^^
Ok, done. In galaxy it looks like this:
It puts the code into a trigger and executes it in a thread. And it helps to avoid waiting in the main function until the Wait() function finish its pause job. Going to test it now.
Why are you posting galaxy script even though you obviously use GUI to code? Right click on a line in a gui trigger/func/action and select "select all", then just right-click again and select "copy as text".
PS: The text tag thingy will most likely not fix your lag issue. After checking the trigger debug window (for triggers going crazy or trigger-threads that build up) id probably go for actor problems (like not destroyed actors) or other stuff in data that doesnt get removed properly.
Sadly there seems to be no way of monitoring what happens in the data part of the editor, so its pretty hard to find out if smth is building up over time. If anyone knows a way to monitor data stuff id be very interrested in that.
It's the only way to communicate for me, because first, my editor is translated, and second, it translated not perfect. So, oonly galaxy code is something I share with everyone. Also, I was curious myself, so just shared what I realized.
Yes, I'll check it after I finish woth text tags. Because 1-2K of undestroyed text tags must definitely consume some noticable amount of perfomance.
@Mille25: Go You can remove all effects with a trigger action. So you can check, if removing effects on the whole map raises the FPS or not. So obvious problems can be identified with that.
Ok, after some tests I can say that undestroyed text tags were definitely the main source of lags. Thanks, Ahli.
But I don't mark the thread as solved, because I may ask something else. Still not sure if there any other unexpected lag sources.
@Ahli634: Go
Wow thanks. My tower sell trigger was leaking an actor each time. Over the course of a game there could be 1000+ sells. I wonder how much performance improvement I'll get now that I fixed it.
@Zolden: Go
Personally i would try to get the english version of the game, at least for map editing. I remember that the german version was horrible and i couldnt work with it, since it was poorly translated and it just felt weird to code in another language than english. You should be able to download the english version from battle.net officially. (At least i remember doing this when the game released bevore i got my US account, im sure its still possible)
Interresting. So you did set the lifetime of all texttags to X but they didnt get destroyed? I did some research yesterday, but the GUI had like 0 information about lifetime vs destroy, i also couldnt find anything in the natives.galaxy. Im glad that i decided to destroy all text tags in SCU even though they have a lifetime since i wasnt sure, haha.
I also tried to find out whether they get destroyed or not with a simple test trigger, but strangely the variable didnt go "null", no matter if i changed the lifetime or destroyed the text tag. On the other side i also wasnt able to show the text tag again once its lifetime expired, even though the variable wasnt null.
Since i couldnt find any difference in behavior i assumed that lifetime automatically destroys the TT after fading.
Yes, I had to. Now it's too late. I got used to the russian one. And I fully understand its imperfect translation. Don't want to spend more time to relearn and feeling super noob :)
I'd like to set a lifetime. But there were notching close to lifetime amongst text tag related triggers I found. I set fade time, thinking it will remove 'em, but no, it never did.
Yes, these results would make me think that that lifetime thing removes them. Maybe one more test could make it even more explicit. Just create like 5K of text tags with lifetime. It will drop the fps. Then check, if fps return back to high level after the lifetime got expired.
This seems to destroy the text tag entirely, the FPS go to 100% after 10000 Text Tags get created and faded out. Thats why im so surprised that destroying fixed your lag issues, since as far as i had understood it you already used the duration thingy for your tags.
EDIT: I think i see the problem. You set the "Fade Duration", but not the "Duration". Duration fades the tag aswell though and destroys it properly.