27.03.2017 12:12, Paul Reeves wrote:
>
> The EPB is clearly documented as being limited to 15 events. I did a
> fairly rough grep of the code and I failed to find where this
> limitation is enforced. And I couldn't find anything in the release
> notes to indicate that anything has changed since InterBase days.

   I was sure i saw that limit in the code some time ago, but i failed to
find it now. I looked at both fb2.5 and fb3 code.

> In practice this limitation is not a problem. It is also clearly
> documented that if more than fifteen events need to be registered then
> another EPB needs to be declared by the listener.
>
> But the question comes to mind - is this still a limitation or has code
> refactoring or the move to 64-bit silently removed the limitation
> without anyone noticing? Or have I missed something while grepping the
> code?

   Below is a limitations i found in current code:

- event name length is stored in EPB using one byte,
   thus event name is limited by 255 bytes

- whole EPB length should be less than MAX_USHORT, i.e. <= 65535 bytes
   it means single EPB could contain no more than

     (MAX_USHORT - 1 - 1 /*for EPB_version1*/)
     /
     (1 /*name len*/ + 255 /*max name*/ + 4 /*event counter*/)

     = 252 events

   If i not missed somethig, up to 252 events per EPB should work at least
in v2.5 and later versions.

Regards,
Vlad

PS The my own guess why such low limitation is documented - it is not
practical to pass large (up to 64KB) packet over the wire every time a
couple of events (of up to 252 registered) is fired.

   Time to process this packet also matters - why waste time looking at
 >200 event entries for changes in counts when just a few of them really
changed.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to