Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Spoon on April 18, 2012, 01:04:46 pm

Title: Optimize FRED event window kthx
Post by: Spoon on April 18, 2012, 01:04:46 pm
It takes a full minute for this damn thing to close down! Just because this mission has 430 events doesn't mean its acceptable for FRED to slow down to such a crawl that windows thinks it has stopped responding!

Looking forward to multthreaded FRED
much love,
Spoon
Title: Re: Optimize FRED event window kthx
Post by: Legate Damar on April 18, 2012, 01:11:24 pm
I have problems with my FRED too. Whenever I have a mission with more than a dozen or so ships it slows down to a crawl.
Title: Re: Optimize FRED event window kthx
Post by: General Battuta on April 18, 2012, 01:18:40 pm
I have problems with my FRED too. Whenever I have a mission with more than a dozen or so ships it slows down to a crawl.

Turn on 'show ship models', stop using wireframe view

As for the original request, I'm outraged by how long it takes to close the events window on my 500kb missions! Fix this immediately, as soon as you're done with wxfred, the new installer, and geomod
Title: Re: Optimize FRED event window kthx
Post by: AndrewofDoom on April 18, 2012, 02:41:08 pm
/me mind blown.

Where would you need 430 events to run a single mission? It just sounds like a troubleshooting nightmare if something goes wrong... :shaking:
Title: Re: Optimize FRED event window kthx
Post by: Droid803 on April 18, 2012, 02:47:07 pm
If it won't even let you close the events editor without freezing then debugging is the least of your worries.
Title: Re: Optimize FRED event window kthx
Post by: General Battuta on April 18, 2012, 02:49:38 pm
/me mind blown.

Where would you need 430 events to run a single mission? It just sounds like a troubleshooting nightmare if something goes wrong... :shaking:

You are incorrect! And it's not particularly hard to troubleshoot if you are good at keeping your events modular and contained.

Sometimes you just need to handle a lot of branches, a load of dialogue, etc.
Title: Re: Optimize FRED event window kthx
Post by: jg18 on April 18, 2012, 03:06:39 pm
Looking forward to multthreaded FRED
Multithreading does not automatically make code run faster. It can even make code run slower (see lock contention (http://en.wikipedia.org/wiki/Lock_%28computer_science%29#Granularity)). How much it can help depends on how much performance can be gained from running multiple tasks in the code at the same time instead of one after another (that is, how parallelizable (http://en.wikipedia.org/wiki/Task_parallelism) the code is). I'm not familiar enough with the FRED codebase to say how much it could help, although hopefully someone who is can address that.

Also, in case you didn't know, the FRED codebase is a gigantic hackish mess (see below), so making non-trivial changes to it is pretty much infeasible.

In the FS2 codebase I'd argue the most heinous code of all is the MFC meatwagon that is Fred. Oy.
Quote from: FRED2_Open "About" window
Fred2 is the omega of all giant unwieldy pieces of code. Its big, its horrifying, and it just doesn't care. View it at your own risk. - Dave Baranec

That said, your grievance is certainly legit.

As for the original request, I'm outraged by how long it takes to close the events window on my 500kb missions! Fix this immediately, as soon as you're done with wxfred, the new installer, and geomod
This issue is a good candidate for something to address in wxFRED.
Title: Re: Optimize FRED event window kthx
Post by: mjn.mixael on April 18, 2012, 04:01:35 pm
:nervous:

Assuming wxFRED ever gets really going again...
Title: Re: Optimize FRED event window kthx
Post by: Goober5000 on April 20, 2012, 09:36:40 pm
It's essentially impossible* to parallelize the FSO or FRED codebases without rewriting the entire code library from scratch.

*Certain parts, like rendering and sound playing, run in different threads.  But that's only because there is a clear and sharp dividing line between those parts and the rest of the code.