[erlang-patches] Fix for: extremely slow Erlang to/from Java communication via JInterface

Henrik Nord henrik@REDACTED
Fri Dec 9 13:24:30 CET 2011


Yes this patch is included for the R15B release.

Thank you for the contribution, and sorry for the lack of response

On 12/08/2011 06:40 PM, Nico Kruber wrote:
> I haven't heard anything in a while.
>
> Has this patch been included for R15B?
> Or is there still something to do?
>
>
> Regards
> Nico Kruber
>
> On Wednesday 30 November 2011 14:21:29 Nico Kruber wrote:
>> thank you for that tip - I wasn't even aware of Arrays.copyOf being Java6
>> only.
>> I replaced it by your code in my branch.
>>
>>
>> Nico
>>
>> On Wednesday 30 November 2011 12:35:14 Vlad Dumitrescu wrote:
>>> Hi,
>>>
>>> I think that it's easy to fix, just replace that line with
>>>
>>>              final byte[] tmp = new byte[super.count];
>>>              System.arraycopy(super.buf, 0, tmp, 0,
>>>              super.count);
>>>              super.buf = tmp;
>>>
>>> regards,
>>> Vlad
>>>
>>>
>>> On Wed, Nov 30, 2011 at 12:29, Raimo Niskanen
>>>
>>> <raimo+erlang-patches@REDACTED>  wrote:
>>>> On Wed, Nov 30, 2011 at 12:16:29PM +0100, Vlad Dumitrescu wrote:
>>>>> Hi!
>>>>>
>>>>> 2011/11/30 Nico Kruber<kruber@REDACTED>:
>>>>>> We discovered, that the communication between Erlang and Java
>>>>>> is
>>>>>> extremely slow when sending longer lists.
>>>>>>
>>>>>> git fetch git://github.com/NicoK/otp.git
>>>>>> jinterface_better_buffer_alloc
>>>>>>
>>>>>> https://github.com/NicoK/otp/compare/jinterface_better_buffer_
>>>>>> allo
>>>>>> c
>>>>>> https://github.com/NicoK/otp/compare/jinterface_better_buffer_
>>>>>> allo
>>>>>> c.patch>>
>>>>> This patch uses Java 6 features. Isn't jinterface supporting even
>>>>> Java
>>>>> 5?>
>>>> That is correct. JDK 1.5 is the least common denominator.
>>>>
>>>> Then it will not pass our tests.
>>>>
>>>> Is it the java.util.Arrays.copyOf method that is too new, or is
>>>> it more? Can the patch be rewritten?
>>>>
>>>>> regards,
>>>>> Vlad
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> erlang-patches mailing list
>>>>> erlang-patches@REDACTED
>>>>> http://erlang.org/mailman/listinfo/erlang-patches

-- 
/Henrik Nord Erlang/OTP

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20111209/0d67fc1e/attachment.htm>


More information about the erlang-patches mailing list