zeromq.node icon indicating copy to clipboard operation
zeromq.node copied to clipboard

phase 2 flush clean up

Open reqshark opened this issue 10 years ago • 4 comments

i assume there is a phase 2 attack coming.. we can talk about that in this issue if need be

however before that one thing we need to do i think is delete this line of code: https://github.com/JustinTulloss/zeromq.node/blob/master/binding.cc#L393

we really shouldn't have any asserts in production code, but most of them are fine actually. they tend to reside in harmless places with minimal impact on perf. that line, however, is highly suspect IMO we need to get it out of that block

reqshark avatar Feb 13 '15 03:02 reqshark

Can you tell us what that line is attempting to accomplish? I'm still not too comfortable around native node code.

ronkorving avatar Feb 13 '15 03:02 ronkorving

it's attempting to accomplish nothing but print diagnostic information. asserts are lame and computationally expensive with zero benefit... unless you're in the middle of writing and debugging new code

http://en.wikipedia.org/wiki/Assert.h

reqshark avatar Feb 13 '15 04:02 reqshark

I understand what assert does :) I'm wondering what this assert does :)

ronkorving avatar Feb 13 '15 05:02 ronkorving

ok I'll PR that separately later today and probably take out these asserts as well: https://github.com/JustinTulloss/zeromq.node/blob/master/binding.cc#L443-L445

because i dont care about asserts as much as cleaning up flush and putting it in C++ land if it could boost this module's overall performance

reqshark avatar Feb 13 '15 14:02 reqshark