Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    24
  • comments
    21
  • views
    17675

I feel dirty

Sign in to follow this  
Enigma

292 views

This week at work I was asked to profile something from an older codebase. So I opened the project and tried to build it but ended up with compiler errors. After trying a few things to see if it was a problem with my project setup the guy next to me thinks for a bit and then turns to the project lead. "Has anybody managed to build that in 2005"? Turns out it could only be compiled in VC6. Shudder.

I borrowed an older box with VC6 on it, finally got everything setup and got the project built. Now comes time to do the profiling. We didn't need anything clever, just some basic call counts and very rough percentage timings, so I just stuck some static counters in and a very rough profiler using c time functions and writing output to a file. Which led to the following conversation*:
Me       : What file output and timing functions do we have in this code base?
I was going to use fstream and ctime, but I'm getting compile errors in xlocale.
Co-worker: Just use a FILE pointer.
Me : I'm getting errors about clock too.
Co-worker: Really? What sort of errors?
Me : It says clock is not a member of std

Me : Wait a minute. This is VC6. It's probably not a member of std.
I hate VC6! (*conversation may not be word-for-word accurate)

Having finally got everything working the results were certainly interesting. It just goes to prove that even experts are pretty bad at guessing bottlenecks. Everyone expected the function I was profiling to be called a lot and to be taking up a large proportion of the execution time. The profiling results showed it was being called relatively infrequently and taking up a relatively small proportion of the total execution time. This is why you should always profile before spending time optimising.

Actually that's not the entire story. I was coming down with a mild flu-like bug whilst doing all this and so wasn't at my sharpest. After thinking about it over the weekend I suspect there might be another related function that also needs to be profiled. I'll probably have a look at that tomorrow.

I also got my first batch of free games this week. One of the advantages of working for a company that's owned by Sega is that I get a free copy of every game Sega publish! The initial batch wasn't overwhelming, Rome: Total War - Alexander (PC), Virtual Pro Football (PS2) and Let's Make a Soccer Team (PS2), but there are more interesting titles coming up.

I think that's all the news this week. I didn't manage to get much done on the mod front due to aforementioned flu-like bug. Hopefully one day in the not-to-distant-future I'll be able to post some screenshots of the mod stuff I'm working on since I'm sure you're all bored to death of reading my inane ramblings.

?nigma
Sign in to follow this  


2 Comments


Recommended Comments

Yeah we have products like that where I work that only build in VC6. Heck we have one product (that thankfully I have nothing to do with) that only builds in VC1.5 [eek]

Share this comment


Link to comment
You could probably cram STLport onto the box; I know I don't go anywhere near VC6 without it installed.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!