My suggestion to speed up the step call backs would be to have the JNI
code do the actual step routine and cache up the pertinent information
into an array.
Then after it's complete or the cache limit is reached (set the cache
limit to a sufficient size such that the time spent processing that
information in Java outweighs your JNI communication time, at least by a
factor of 10 I think) return the cache to Java for processing.
Other than that, you will be limited by the JNI overhead.
http://www.excelsior-usa.com/ has a product
thttp://www.excelsior-usa.com/xfunction.html which lets you call native
libraries without writing any kind of JNI code. The reason I'm pointing
it out is that they may have some optimizations that you might not have
though of. Anyways, it's not free, but there is an evaluation version
that should let you decide whether or no it fits your requirements.
Brannon King wrote:
So who here has the _fast_ Java solution for accessing SQLite3?
Here's what I've done so far. I took the wrapper from wiki page labeled
"Java wrapper incl. JDBC driver for SQLite.
¤http://www.ch-werner.de/javasqlite;. I then fixed the calloc calls so that
the params were in the right order, fixed the finalize calls that should
have been reset calls, added some bind functions, built some step functions
without the column name/type overhead, and compiled it with my 3.3.6 code
from last week. So the step function(s) for that library take a Java
callback function. Alas, that seems to be too slow. The overhead of the
Java-to-C then the C-to-Java call all in each step function is just too much
overhead in JNI calls. Anyone else seen that issue?
Is there some standard tool that will generate a JNI dll from the
sqlite.dll? And if so, will that do step functions without the callback
I suppose I'll dig in and make a custom JNI interface so that most of my
code is done in C, but just thought I'd ask around first... Thanks for your
time. The other Java wrappers posted seem to wrap too much or too little or
not be compatible with version 3.