force loading libquiche early
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
parent
5a5ffd65e8
commit
69b7fe2887
|
@ -22,7 +22,9 @@ import java.nio.channels.SelectionKey;
|
||||||
import java.nio.channels.Selector;
|
import java.nio.channels.Selector;
|
||||||
import java.util.EventListener;
|
import java.util.EventListener;
|
||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
import org.eclipse.jetty.http3.quiche.ffi.LibQuiche;
|
||||||
import org.eclipse.jetty.io.ByteBufferPool;
|
import org.eclipse.jetty.io.ByteBufferPool;
|
||||||
import org.eclipse.jetty.io.Connection;
|
import org.eclipse.jetty.io.Connection;
|
||||||
import org.eclipse.jetty.io.EndPoint;
|
import org.eclipse.jetty.io.EndPoint;
|
||||||
|
@ -54,6 +56,12 @@ public class ServerDatagramConnector extends AbstractNetworkConnector
|
||||||
_manager = new ServerDatagramSelectorManager(getExecutor(), getScheduler(), selectors);
|
_manager = new ServerDatagramSelectorManager(getExecutor(), getScheduler(), selectors);
|
||||||
addBean(_manager, true);
|
addBean(_manager, true);
|
||||||
setAcceptorPriorityDelta(-2);
|
setAcceptorPriorityDelta(-2);
|
||||||
|
|
||||||
|
// Force loading libquiche here.
|
||||||
|
long before = System.nanoTime();
|
||||||
|
LibQuiche.Logging.enable();
|
||||||
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Loading libquiche took {} ms", TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - before));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ServerDatagramConnector(
|
public ServerDatagramConnector(
|
||||||
|
|
Loading…
Reference in New Issue