Subject Re: [Firebird-Java] Jaybird 3 and Excelsior Jet
Author Mark Rotteveel
On 14-5-2017 18:50, hugo.larson@... [Firebird-Java] wrote:
>
>
> 94 ms. Still fast.
>
> I think JET by default exclude character sets such as Chinese.
> Do you think all has to be included for Jaybird 3?

It shouldn't be necessary, but on the other hand I have no clue as to
why it would be so slow as shown in your initial post, where it took 5
seconds (judging by the logging) to initialize the default encoding set.
I am also a bit surprised that it doesn't behave similarly with my small
reproduction program.

How long does the following take as an Excelsior Jet program (with
Jaybird 3 included on the classpath):

import org.firebirdsql.encodings.DefaultEncodingSet;
import org.firebirdsql.encodings.EncodingDefinition;

import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.logging.Logger;

public class CharsetLoading2 {

private static final Logger LOG =
Logger.getLogger(CharsetLoading2.class.getName());

public static void main(String[] args) {
LOG.info("start");
long start = System.nanoTime();
List<EncodingDefinition> encodings = new
DefaultEncodingSet().getEncodings();
long end = System.nanoTime();
LOG.info("end");

LOG.info(encodings.toString());

long duration = end - start;
LOG.info("Took " + duration + " ns (" +
TimeUnit.NANOSECONDS.toMillis(duration) + " ms)");
}
}

--
Mark Rotteveel