FunctionPackage: net.jlinkerToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
Unrevised from 9.0 to 10.0.
9.0 version

jlinker-buffer-size

Arguments: &optional size

This function is used to query or to set the buffer size used to transmit data from Lisp to Java.

If the size argument is omitted or is any value other than an integer, then the two values returned are eql to the current buffer size in use (and to each other). If the size argument is an integer then the two values returned are the new buffer size and the previous buffer size. The new buffer size is always adjusted to be no less than 128 and to be even.

The default buffer size of 512 is normally adequate and sufficient. Changing the value of the buffer size affects the current Lisp/Java connection and all subsequent connections. A new value takes effect as soon as any active transfer ends.

Setting on Windows

Under some circumstances in Windows 2000, the default size of 512 bytes seems to introduce unexplained delays. The effect is most clearly visible when transmitting a very long (more than 100,000 byte) string from Lisp to Java. With some buffer sizes, the operation takes a long time and the Windows Task Manager reports low cpu utilization during the transfer. With other buffer sizes, the Task Manager reports almost 100% cpu utilization and the transfer is correspondingly much faster. If transmitting large blocks of data from Lisp to Java is a significant component of an application, it may be worthwhile to experiment with the buffer size to optimize the rate of transfer.

If transfer delays seem to be occurring, reducing the buffer size often eliminates the delays, even though this strategy is at odds with the greater efficiency of larger buffer for large data transfers.

See jlinker.htm for more information on the jLinker facility.


Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 9.0 page.
Created 2015.5.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
Unrevised from 9.0 to 10.0.
9.0 version