- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Nor any machine that has more than one core. Even if the SO is linux, that has some kind of real time scalonator.
Admin
Briliant. Whatever the enterprises think that we are an cost center, we need to do this thing.
Admin
No "Ivory tower" here, I am probably in the bloodiest trenches more than post.
"Junior Developer" do not appease the powers that be...something "more" is needed.
Seriously, I stand by all that was in the original (quoted) posting. Specifically, there have been three major engagments that my firm completed in the past 2 years, where the root cause of the clients perofrmance problems, was that they had indeed reduced the number of GC cycles, but had made them very expensive. With a complete re-design, keeping object lifetimes as short as possible (and increasing the nuimber of temporary objects per second by over three orders of magnitude, with a corresponding increase in the number of collections, performance went up singlificantly, and the % time spend in GC when down by over a factor of 10.
Admin
I do near real time applications in C# all of the time. There has not been a single case where the perofrmance of .NET made the difference between being able to achieve the goals (or not) compared to native C++. In every case, it has been the underlying operating system which is not designed for nrt applications (unless you start getting into kernel mode drivers, but then technically they are not applications).
Admin
You never know, it might be a woman, or a bothie, or a neither.
Admin
Anyway, what I usually do is I create all the windows, dialog boxes, and such ahead of time, and just move the one I want to use to the top and make it modal. It may look a little messy to a beginner, but if you try it, I'm sure you'll see the benefits.
Also, I love you, Nagesh.
Admin
Admin
I was talking about the fact that today computers arent anymore predicatable machines. Real realtime is impossible. only near real-time is, and with an error margin, that can be very small and for some things doesnt matter.
Very cool that is possible to make thinks in csharp with near real-time performance. i will give a try.
Sorry, i am very poor english writer and in my primary lang also (i think i am poor at it). whatever, i am a coder, not an writer.
Admin
I'm going to have to second this (no +1, sorry), but will ignore modern pools, caches, etc... "Back-in-the-day", when programming games to strict system requirements, I pre-allocated so nothing could screw you after loading.
But then I was young and may have suffered from the ignorance that comes with it.
Admin
Okay, the "reply-no-quote" semantics weren't expected... Just responding to someone defending certain cases of pre-allocation.
Admin
yes it is
Admin
hey topcoder long time...
Admin
die!!!!!!
Admin
...and if it would still fail, instead of throwing an exception about not able to clone the object it would return the same object that was passed to it. Caller might have the surprise of his/hers life.
Admin
[quote user="TheCPUWizard"]Hint: Temporary Objects to NOT cause issues, they prevent them. The overhead of GC is based much more of the complexity of the LIVE object graph.quote]This.
Admin
Admin
Why no update after this p***-poor article in 3 days? The least Alex could do is release some obviously-photoshopped Error'd images!
Admin
Admin
Post using diff name, idiot!
Admin
Hmm... the 11th time I watched that movie Chewbacca didn't escape.
I know that's lame, but I had to make some comment on the best WTF comment I've read in a very, very long time.
Admin
Admin
So, he created a really, really shitty memory pool allocator implementation. For UI controls.
Admin
i was curious why one would do that (what is the connection between system.gc and f.delete), then with some google search, i came across this thread:
http://stackoverflow.com/questions/2128537/how-to-diagnose-file-delete-returning-false-find-unclosed-streams
May be, the developer felt the system.gc as a fallback in case the cleanup of file-handles were missed at a place or two.
Admin
FTFY
Admin
Admin
Admin
Admin
Admin
C#
[This is not a spam]
Admin
Doesn't make any sense. Might swell create the dialog at startup, since you are using the amount of memory anyway.
Admin
Doesn't make a any sense, since you are allocating the amount of memory anyway. You may as well create the dialog at start time.
Admin
His plans weren't foiled .. he just realized that since he doesn't have enough memory to make a full sized clone, he had to reduce the size of the clone .. ;)
Admin
The real WTF is running OO Memory in the first place!
Admin
Admin
Who knows, it might have been a magic number... doubled... with padding... maybe 4 worked and he upped it to 10 to make really sure.
At any rate, looping at all for this kind of thing is a performance issue, the correct behavior would be to let the UI (or logging mechanism, etc...) catch the OOM exception, inform the user and gracefully close down the app.
Admin
The implementation (and placement) is screwy, but there are cases where this sort of thing is warranted. It's far easier to run out of memory in C# than in C or C++, since objects persist for a while after you're done with them and you can't allocate instances of classes on the stack, so it's possible to outpace the garbage collector by simply performing some calculations in a loop, even if you don't allocate any objects that aren't immediately discarded. In such cases, if you realize you're outpacing the GC, then forcing it to collect at certain points in the code can transform an always-runs-out-of-memory program into a never-runs-out-of-memory program, and depending on the complexity of the program, that can be the easiest (I won't claim it's the best) way to get it working.
Admin
uh, I'm currently suffering from an LOGIC DOES NOT COMPUTE exception, my head hurts :(
Admin
LOL :D