Bill Kelly
2007-Feb-26 19:40 UTC
[Eventmachine-talk] Crash occurs where EventMachine.connect
From: "Michael S. Fischer" <michael at dynamine.net>> On 2/26/07, Francis Cianfrocca <garbagecat10 at gmail.com> wrote: > >> These are good points. Are you handy with C++? If so, feel free to add the >> exception code I suggested above (or a better implementation if you come up >> with one) and profile it. try/catch throws a lot of stuff on and off the >> runtime stack, and in a busy application that could easily happen thousands >> of times a second. > > I''m no good with C++, but I can patch the EventMachine source and > rebuild it. Unfortunately, I am not yet in a position to profile any > such changes because the project I''m working on is still under > development. I''m a long way off from doing any performance profiling.Could just temporarily make evma_connect_to_server() do nothing (just return.) Then call t_connect_to_server() in a loop 10,000,000 times or so, with and w/out the exception handling in place. I suspect the try/catch overhead will be minimal... but I''ve been wrong before. :D Regards, Bill