Pages: [1] :: one page |
|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |
Kilmatar
Minmatar Aeria Gloris Inc United Legion
|
Posted - 2007.04.11 08:17:00 -
[1]
I want to make one more topic about game freezes cause this freezes makes Eve life a little incomfortable. At first: Test Application There are no viruses in this application. You can just trust me or download this app and check yourself. This application simulates one aspect of Eve - opening Market.
Let's experiment!
Start test application. Top part of program interface - a "Market" Bottom part - "Chat". Top right - "Market" items counter. Pressing "Eve way" or "Normal way" buttons results in filling "Market" with 15000 random numbers (this simulates loading a marketing data in game). But this filling will be made by different ways.
Press "Eve way" button and start typing in "Chat" window something. As you can see - until all data loaded you can't see this data in "Market" window, data counter not changing and chat window doesn't show what you typing. HAHA! Just like in EVE!!
Now press "Normal way" button and start typing in chat window something. A miracle!!!! Data counter updates, all data is visible and you can type in realtime!!!
What's a difference? A little theory (simplified): In MS Windows every time you move your mouse or press buttons system generates a message. System sends this message to all applications in chain order. If one application in this chain not ready to work with this message (for example - making calculations) all next messages will be queued. Some special actions can be programmed for resolving this situation (just one line of code )
It looks like EVE doesn't correctly works with message queue. All system messages waits until Market is filled with data. So - you can't type anything and can't move windows.
Don't want to blame EVE programmers cause i'm not completely sure. But opening market looks little bugged. -------- Sorry for my English! ============= Matari Rullz!
|
Solbright
|
Posted - 2007.04.12 11:42:00 -
[2]
I'd be interested in a fuller discription of what you've done. Not for Eve or anything that uses DirectX since they don't use the same API but for desktop apps. That queued behaviour drove me nuts ever since having to use Windoze.
|
Kilmatar
Minmatar Aeria Gloris Inc United Legion
|
Posted - 2007.04.12 17:54:00 -
[3]
I'm programming in Delphi, so - can show you only Delphi example.
Wrong code: for i:=1 to 15000 do begin //some code here end; ============= Correct code: for i:=1 to 15000 do begin //some code here Application.ProcessMessages //This allows to all messages be translated //to other programs in chain end;
If i'm correctly remember in C it's PeekMessage function but not sure ============= Matari Rullz!
|
Solbright
|
Posted - 2007.04.13 00:23:00 -
[4]
Thanks. Yeah, Delphi will make your life easier. It's amusing when it comes down to all programs having to be nice to each other. I guess there is always some of that going on like using a waiting call at the start of the main event loop. And at the driver level it's a vital coding behaviour.
There is good and bad points of course. A good point is programmer/designer gets to hardcode when multitasking slices happen and can spread them out for optimal CPU utilisation. The opposing bad point is that this is very fiddly to get right which is why preemptive schedulers are the norm these days.
As for Eve, a method like that could be built to apply to Eve's own internal event system. It does get scary though, as then Eve starts creating potentionally unlimited number of internally tracked threads with possibly many of them sitting in the same loop of code each running through a separate data list.
I suspect CCP will be working along another but similar line. Removing the loop and having state based progress through the lists. It's still cooperative like your example but umm ... dunno can't think. Making this up as I go. :P
|
Dronte
Minmatar Mordus Angels
|
Posted - 2007.04.13 09:09:00 -
[5]
While on the topic of programs being nice to one another, id like to see the busy loops in the Login and character selection screens be removed / fixed. Its kinda annoying that it has to take up 100% CPU just to open up the EVE login window. I mean, how hard can it really be to sleep 1 ms, yield or whatever you want to do codewise. But
while(true) { //Wait for input }
is just bad coding, sorry. Besides is damn annoying when you are logging in youre secondary account, for which you are paying ofcourse, and having your main client lagging to hell cause for some odd reason there are suddenly no more CPU left to handle its requests. I know its not directly linked to this topic, so sorry for a bit of thread-hijacking, just had to get it off my chest :)
|
Solbright
|
Posted - 2007.04.13 10:44:00 -
[6]
The only busy loop is the continual rendering. It's a normal game - ie: There is really no reason for it to give up any CPU since it's a dedicated program. And, as for complaining about just the login, that's being seriously picky.
Another case of brain washing imho.
|
Solbright
|
Posted - 2007.04.13 10:48:00 -
[7]
Sorry if that comes across offensive but you got to be thinking about something more substantial than a niggle with the 5 seconds of log-in!
|
Dronte
Minmatar Mordus Angels
|
Posted - 2007.04.13 11:47:00 -
[8]
Edited by: Dronte on 13/04/2007 11:45:05 While you may not agree with me, its still bad coding practices of using busy loops when its not needed. My main problem is really that it puts undue load on the processors. There is absolutely not reason what so ever that the login and character screens needs to take up all the CPU time. Im not complaining about a rendering busy loop, cause none exists. As soon as you are past the login/char select screen, the CPU usage returns to "normal application load usage". Yes the rendering loop still high but it doesnt impact performance anywhere near as much as the login or char selection screens does. But have a try at this. Open the Task Manager, go to the Performance tab, watch the CPU graph(s). Fire up EVE and watch what happens as soon as the login window appears, the CPU load goes through the roof. But only as long as you have the window active.
You might not be bothered by it since you instantly login to all your characters at once etc. but i am sometimes bothered by it, when say, flying my main through lowsec or 0.0 space, wanting to login one of my other characters, and the having 1-2 FPS on the main untill the secondary char is fully logged into the game. Dont really care what your oppinion on me logging in characters while in un-safe space is, the my gripe with this is that it is totally unneccessary and fixable with one or a few lines of code, which should have absolutely not chance of b0rking anything else, so theres really no reason to not "fix" this.
Both myself and a mate of mine have had problems where for some reason we had left our computer, though still being logged into EVE. Then for some reason we got disconnected from the server, which returns us back to the login screen (i know it can be changed through the preferences menus but its the default action to re-open the login screen), which means our computers had been sitting there running with 100% load on the processor / core for how ever many minutes / hours we were away. And you can say what you want, its better for the CPU to be under normal idle load than running with 100% CPU for hours on end, especially since the CPU time is totally pointless.
|
|
|
|
Pages: [1] :: one page |
First page | Previous page | Next page | Last page |