• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[General] Minimizing World Editor loading times?

Level 8
Joined
Dec 30, 2007
Messages
72
Hey, team!
I've been working on a WCIII project for quite a while now. It's not sprawling by any means, but it is large; despite this, tooling around with other productions has left me wondering if the absurdly long World Editor load times are an issue on my end or the project. Saving and loading my map - and especially opening it for the first time - takes a very long time, on the order of several minutes or more per operation, which makes it difficult to work with the project in any capacity.

I'm wondering if we know anything about what contributes to this time, and if there's a way to improve it. Attached are images of some artifacts I've identified as potentially unusual: foremost, the appearance of 'ghost' triggers at the bottom of the Trigger Editor (these reappear after the map is reopened even if deleted), as well as the ridiculously high number of triggers reported by the World Editor when saving (a false report; the map obviously does not have 600 million triggers). I'm wondering if they could be symptoms of some unknown lingering corruption in the file or if there's something in the MPQ I could excise to solve any emergent issues they might be indicative of.

1759654276893.png
1759654290092.png

These images are from a version of the map very early in development, which does load in much less time, but is a much smaller file with fewer imported assets. If this is the case, is the loading time of the map strictly a function of filesize?
 
Whats the brunt of the time when saving the map? Which Progress/Progresses takes the longest to save?
On World Editor launch, most of the time is spent on the "Loading Triggers" step. It doesn't report a number of triggers in the current version of the map, and during this time (7-10 minutes) Windows behaves as if World Editor is not responding.

Time when saving the map varies, usually with a similar 'not responding' behavior during saving doodads or triggers that prevents really seeing which steps if any might be taking excessive amounts of time.
 
hmm those glitches do sound pretty unusual. Would you mind opening the Object Manager (F11) and sharing a screenshot of the map summary? That might help us give a clue on the size of your map and things to take a stab at.

If you are using the latest versions of the editor (reforged onward), I would first try to use the "Save Map as folder" feature. If you go to File > Save As and change the file-type dropdown to "Warcraft III Scenario Folder", it'll allow you to save the map as a folder instead of as an MPQ. This is a really useful feature they added for project management, but it also means that the editor can essentially skip the "Creating map archive" step--which can take quite long if you are saving a map with really heavy assets that would otherwise need to be packed into an MPQ.

On the note of heavy assets--you may also want to consider omitting your heaviest assets (e.g. sounds/music) until you are ready to ship your map. But I'd first save your map as a folder and see whether omitting any imports makes a big difference or not (measure the time before/after). The nice thing with saving your map as a folder is that you can always temporarily move some of your imports elsewhere and then easily just copy and paste them back in by putting them back into the folder hierarchy.

As for your triggers, if they are taking a long time to save/load, you may want to look into an external tool like BetterTriggers. It allows you to edit your triggers outside your map--which means you can edit triggers separately from the map and edit the map separately from its triggers. But it does require a workflow change (every time you want to test your map, you'd have to do it with the BetterTriggers tool). You can read more about it here: Better Triggers – Nextra

As for the file corruption case--you can try sharing it here (or in a private message via a pastebin link) and we can take a look to try to see if there's anything weird on the data side. Alternatively, the best way to diagnose it yourself is to try to transfer all your data to a blank map manually to see if that makes a difference.
 
I've never opened the Object Manager and it appears accessing certain tabs within it causes an editor crash. I'll report back on this with a screenshot - it'll naturally take some time to get it figured out.

1759729323147.png


Here's a printout of the Object Manager. I'm not entirely sure how JASS triggers are read in terms of trigger count - much of the gameplay is GUI I'm not certain 1919 triggers is a correct number but it'd take a while to go through and actually count rather than doing something that might get a better handle on the problem.

Meanwhile, it seems as though opening literally any tab in the Object Manager beyond Map Summary is causing an immediate crash. Should I be looking in war3map.j for something in particular, perhaps?

1759730000538.png


Aside, on the subject of "things that could be related to something", launching the map gives these status-line messages about 'netsafe' and 'tileset X' that I have no idea about...

Last thing for the time being: exporting the map's triggers to a fresh canvas creates only two "ghost triggers" (as opposed to the 8 from the main project). Deleting one appears to delete both. The map reports 1918 triggers afterward (down from the main project's 1919). Viewing the Triggers tab in the Object Manager of this new map causes an editor crash.
 
Thanks for sharing that screenshot--that summary alone is enough. :thumbs_up: It was mostly for us to get a sense of the size of your map and how many custom triggers/objects there are.

Eaglendia said:
Aside, on the subject of "things that could be related to something", launching the map gives these status-line messages about 'netsafe' and 'tileset X' that I have no idea about...

I believe everyone gets those warnings with the reforged editor. It isn't something to worry about.

Eaglendia said:
Last thing for the time being: exporting the map's triggers to a fresh canvas creates only two "ghost triggers" (as opposed to the 8 from the main project). Deleting one appears to delete both. The map reports 1918 triggers afterward (down from the main project's 1919). Viewing the Triggers tab in the Object Manager of this new map causes an editor crash.

Interesting. Does the loading time improve at all in the fresh map?

Also, did you get a chance to try saving the map as a folder?

I've seen some threads in the past where people mentioned various issues loading triggers in their map (usually it freezes at some point). There were a few comments mentioning an issue related to trigger comments--but I don't know whether that is still an issue or not (and it didn't seem to solve the issues in some people's cases). Sadly, it is hard to pin-point the exact cause without having the map. Sometimes it is even just computer-specific (e.g. it loads fine on another person's computer). If you are willing to send the map, I can try taking a closer look.
 
If you are willing to send the map, I can try taking a closer look.

You're entirely welcome to take a peek - the map is Legendary Trials, the main project advertised in my signature here. It doesn't use any form of protection, contrary to what the absurd load time has led many to assume (lol). It's an older version than the one I'm working with now but this isn't exactly a new problem. In the meantime, I'll do some more tests on the fresh canvas and report back. As far as I'm aware the problem is not specific to my current device. I wouldn't say it's an issue of hardware performance, either, as this is a pretty modern machine! But I'll go ahead and test on another as well when I get the chance.
 
Aside, on the subject of "things that could be related to something", launching the map gives these status-line messages about 'netsafe' and 'tileset X' that I have no idea about...
Those things didn't really affected your World Editor. The "netsafe"-related issue is something that were broken since one particular patch (even before 2.0).

And the "Tileset"-related error happens since you opened the map with SD assets. Nothing should impact your map.

I've also tested Reforged WE in my PC and found like this, something about missing strings:
WE Missing String Bug.jpg
 
Ive got news. I found out that all of the loading time is basically because of GUI triggers. Converting them to Custom Text reduces loading time by 4000% and saving time by 500%. The rest of the loading and saving time is saving the destructibles and generating map script for trees/destructibles but that becomes small potatoes after everything is code and not GUI but that can also be reduced by limiting the amount of destructibles. This attached edited map is broken since some things got removed while editing but it shows how fast it could load and save.

 

Attachments

Excellent info, but irksome. There's a lot I'd do differently were I to start development today but this wasn't the way in which I expected the inefficiencies to catch up with me! Thanks for the diligent testing; you've been a big help. I'll probably have to get started on a custom script refactor eventually.

Would this be the reason for the Object Manager crashes as well, then?
 
I'm making wild guesses here as I did not actually see your triggers, but ~1900 triggers and ~800 variables is quite a lot. Not that the amount alone would be the definitive cause. I think the issue may lie in the overall complexity of your triggers. The complexity and high amount of triggers coupled with lots of global variables, perhaps even lot of object variables could definitely be the cause for the slowness.
I believe that on map save the editor validates all your gui triggers (for example that a variable used in trigger action is of correct type, etc.) before writing it to trigger file (and then converting it to pure jass and writing it to map script).

What you could try is to lower the amount of triggers/lower complexity of trigger if you don't do that already. Like instead of having 12 triggers that do the same but each for different player, you just write a generic single trigger that works for all players. Instead of repeating action X times, you use loops, etc.
 
Back
Top