[jitsi-dev] [libjitsi] Sets a capacity of 100 to the LinkedBlockingQueue-s used to hold obje… (#76)


#1

…cts to be reused.
You can view, comment on, or merge this pull request online at:

  https://github.com/jitsi/libjitsi/pull/76

-- Commit Summary --

  * Sets a capacity of 100 to the LinkedBlockingQueue-s used to hold objects to be reused.

-- File Changes --

    M src/org/jitsi/impl/neomedia/RTPConnectorInputStream.java (4)
    M src/org/jitsi/impl/neomedia/RTPConnectorOutputStream.java (4)
    M src/org/jitsi/impl/neomedia/rtp/translator/PushSourceStreamImpl.java (2)
    M src/org/jitsi/impl/neomedia/transform/dtls/DatagramTransportImpl.java (2)

-- Patch Links --

https://github.com/jitsi/libjitsi/pull/76.patch
https://github.com/jitsi/libjitsi/pull/76.diff

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/76


#2

Might I suggest that you make the value a parameter using the Config service?

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/76#issuecomment-174694944


#3

Is this a general suggestion, or you see a case where you would need to tune it?

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/76#issuecomment-174727618


#4

I'd like the option to tune something that is set to create ~400 extra objects * number of streams I've got going.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/76#issuecomment-174749747


#5

It will not create 400 objects for each stream, it will limit the number of these objects to 100 per queue. Until now there was practically no limit.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/76#issuecomment-174797560


#6

It's true that what you've done is probably better than leaving it open-ended and possibly leading to an OOM error and while it doesn't create ~400 objects, it creates slots for them to be inserted per stream. If allowing the implementer some means to configure this is not applicable, at least you've shown me a spot extend these classes.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/76#issuecomment-174975589


#7

I still don't see how this would be a useful control to have, and I don't have time to spend on it. If you'd like to implement it I would be happy to review and merge, though.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/76#issuecomment-175127351


#8

@bgrozev Can you please rebase this PR against current master? 900769c5a6967676e0054401a6b6dc2f5a47b448 introduced incompatible changes.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/76#issuecomment-189922875


#9

Rebased. Also included Paul's suggestion.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/76#issuecomment-190354387


#10

Merged #76.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/76#event-571920678