GithubHelp home page GithubHelp logo

Comments (6)

inlife avatar inlife commented on May 14, 2024 2

I'll look for optimal ways of upgrading this capacity

from librg.

inlife avatar inlife commented on May 14, 2024 1

Hey @trsh !

I've released a new version with an optional (at least for now) compile-time flag that extends the event limit from u16 to i32. I know it's not ideal size of u32, but should still be a viable option.

The flag is LIBRG_ENABLE_EXTENDED_EVENTBUFFER.. It needs to be defined for the source part in the following fashion:

#define LIBRG_ENABLE_EXTENDED_EVENTBUFFER
#define LIBRG_IMPL
#include "librg.h"

If the application is networked, both sides should have this defined.

I've also added runtime checks for the event buffer sizes, so at least the there will be some awareness about this issue, and updated the docs.

Let me know if that helps!

from librg.

inlife avatar inlife commented on May 14, 2024

This works exactly as you've mentioned in your update part of the comment. The maximum data size in this context would be of u16 size. Since the negative value would be used to mark this update as rejected and to try again in the next method call.

But you've raised a good point; it seems like I forgot to add a notion somewhere that the size of this buffer is limited. Nor does it do any bound checking to prevent any bigger-sized data from being written.

from librg.

inlife avatar inlife commented on May 14, 2024

Now I'm also wondering if u16 was too small for the job and u32 would be more beneficial in this specific case. Any thoughts on that?

from librg.

trsh avatar trsh commented on May 14, 2024

Now I'm also wondering if u16 was too small for the job and u32 would be more beneficial in this specific case. Any thoughts on that?

Yes. I think, u16 is small. With u32 we could create bigger writes per entity and its up to the library user to lower/split it, if this creates other kind of problems.

from librg.

trsh avatar trsh commented on May 14, 2024

Closing this, as it seems to work as expected after some quick tests with my project.

Thank you!

I will open a new issue, if I encounter any problems regarding this.

from librg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.