Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

tSG

Why is Directx8 Initialization so slow?

This topic is 5996 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, I have made a little program which creates a Directx window + the direct3d device and a directinput device, but the initialization is very slow! That takes approximately 1.121 seconds which is a bit much I think, because I use the retail version of dx. Is dx so slow? Or what else could happen? Thanks in advance -- tSG --

Share this post


Link to post
Share on other sites
Advertisement
interesting. I''ve never bothered to time it. What exactly were you timing (what is the start and what is the end)? How long does the same app take to start up if you remove the DX calls? How long were you expecting it to take?

I don''t know if anyone here will argue with this or not, but I''d say don''t worry about it unless you find that a "real" app is unacceptably slow.

If you let us know what you''re timing exactly, we can tell you if anything is unusual.

Share this post


Link to post
Share on other sites
Cmmon man.What you should tell us is how u measure this.First of all, what pc are u using? Do u measure this using an .exe or when u compile your program? Anyway, what you should really care about is the real-time performance and not the initialization time ...

~The fastest polygons are those you don''''t draw...~

Share this post


Link to post
Share on other sites
I have a cel800 and an abit siluro gf2mx.

Actually, this is the slow part in the initialization:
dx8.pD3D = Direct3DCreate8( D3D_SDK_VERSION ) );
That takes 1.1 sec for me to execute.

You could say that 1.1 sec is not long, but in the development time it is really annoying! I have to compile and execute the program really often, so that takes my important development-time!
I would expect ca. 0.1-0.2 sec for this call, as under opengl. (They are rather similar nowadays)

PiXeLatiOn: I use timeGetTime(), it is rather punctual in the most cases. Oh, and the issue occurs when I run the .exe.


-- tSG --

Share this post


Link to post
Share on other sites
1. I don''t get a pause on any of my machines (home + 2 at work) with either the retail or debug versions of D3D!

2. However I have seen a pause on a colleagues machine.

3. Do you have a virus scanner running ? - that was the cause of the majority of the time on the colleagues machine - the virus scanner was searching all of the DLLs which D3D loads for signatures.

4. Do you use WHQL certified drivers ? - try using non-certified - a lot of extra things get tested in certified drivers!.

5. There are a hell of a lot of things going on during that innocent looking call - try running FileMon and RegMon from www.sysinternals.com - you''ll see a lot of activity!

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
Your chip isn''t exactly the fastest chip and also: do you have lots of icons in your system tray (give us a count)? How much RAM do you have (in MB)? What else is running at the time?

Share this post


Link to post
Share on other sites
tSG is right. Direct3D initialization is slow. Personally I wouldn't bother complaining about it, as I don't consider it a big deal, but my engine supports on-the-fly switching between Direct3D and OpenGL, and activating OpenGL is nearly instantaneous, whereas Direct3D takes about a second to load.

~CGameProgrammer( );



EDIT: And I have 512mb RAM and a 32mb GeForce2 with the latest drivers. I disabled Norton AntiVirus' Auto-Protect to see if it made a difference, but it doesn't make a noticeable one.

[edited by - CGameProgrammer on April 21, 2002 3:23:49 PM]

Share this post


Link to post
Share on other sites
First of all, thanks for the replies!

S1CA:
3. I have a virus scanner running. It seemed as a good explanation for the slowdown, but the init is just as slow if I shut down the virus scanner.

4. I use the 28.32 detonator. I don't know surely whether it is WHQL, but I guess it isn't.

5. Yeah, maybe that is the problem. But why does it need so lots of activities?


Puzzler183: I have 9 icons in the tray + running wincmd and one IE. I have only 256mb RAM, I know it is rather a small amount but CGameProgrammer has 512mb and he/she also has the same performance issue.

CGameProgrammer: It seems that only on some machines. For example on S1CA-s computers it isn't slow.

Btw. what OS are you using? I am using win2000 prof., maybe that is the problem(?)
Long before when I had tnt2 I didn't encounter that slowdown, so another question: what kind of videocards are you using?


-- tSG --

[edited by - tSG on April 21, 2002 4:05:38 PM]

Share this post


Link to post
Share on other sites
That''s a good idea, asking the operating system. I''m using Windows XP Home Edition. Maybe on systems with the 9x kernel, there is no slowdown.

~CGameProgrammer( );

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!