-
Notifications
You must be signed in to change notification settings - Fork 837
Identifier parsing creates to many new objects #612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yes, data fields are limited to four bytes. It sounds like the proper answer is to simply optimize the toHexString() method of the Identifier class so toString() isn't so expensive for identifiers that aren't two bytes or 16 bytes. At first glance simply replacing @ekryvoshey, do you want to try benchmarking a replacement method implementation to see if you can come up with something faster? If so, I'll put it into a test release for you to try. |
Yes, I would like to try and replace logic to something lighter. If you can assist, it would be great! P.S. My itention is to get raw bytes array as Identifier so I can store it as a BLOL in my DB. |
Fixed in #615 |
Hello!
I have a problem: my BeaconLayout is like this "m:0-1=7502,p:3-3,i:0-1,i:4-14,i:15-24". Identifier's summary length is pretty long, and it causing Indetifier object to create too many bew Object during toHexString() execution. And that causing to many garbage collection in the app, UI thread is constantly interrupting with GC so I have UI lag every time I'm receiving beacon colection.
https://drive.google.com/open?id=0B_546mjMnsJ9d2QyazJyc1FraU0
As far as I remember, data fields could be an alternative, but aren't they limited to 4 bytes? Perhaps you can suggest different solution to this?
The text was updated successfully, but these errors were encountered: