SQLite + FTS (full text search)

Chris Angelico rosuav at gmail.com
Thu Jan 23 09:13:00 EST 2014


On Fri, Jan 24, 2014 at 12:39 AM, Mark Lawrence <breamoreboy at yahoo.co.uk> wrote:
>>
>> It is compile time option.
>> http://www.sqlite.org/compile.html#enable_fts3
>> you have to build it with this option enabled.
>>
>
> As an option can be represented in a single bit then presumably the Windows
> msi file only needs an extra bit to allow for this, or have I missed
> something?  While I'm at it what is this "compile time" thingy, being on
> Windows I'm not used to seeing such terminology?

The implication of a compile-time switch is that it completely changes
the code that gets compiled. For instance, Python 3.4 can be compiled
with/out debugging support (which will slow down execution but enable
certain features), with/out IPv6, and so on. Python 3.2 could also be
compiled "narrow" or "wide" with regard to Unicode handling (internal
representation UTF-16 or UTF-32). Each such change could make a huge
difference to the size of the .msi file, but more importantly, a huge
change to functionality. In the case of something like this, I'd guess
that the compile-time switch would control the presence or absence of
the code; at an absolute minimum, that would mean that disabling it
makes for a smaller binary, but since it's an option I'd guess that
there's more to it (maybe the presence of the feature has a
performance penalty even if you don't use it).

On Windows, where you're accustomed to downloading a ready-made
binary, all compile-time choices were made for you at the time the
binary was built. That's what compile time means - when Python (or
SQLite) was turned from C source code into i386 or amd64 opcodes and
packaged up into an exe and an msi. (In fact, one of the compile-time
choices is the architecture - whether you build a 32-bit or 64-bit
binary, whether you aim it at an Intel Itanium chip, etc, etc, etc.
Generally, code runs only if the architecture is correct, though there
are a few compatibility cases (i386 running on amd64, for instance).)
The only real difference between Windows and Linux here is that it's
customary for Linux systems to have C compilers readily available,
where Windows generally forces you to think more about getting one. I
can simply type "sudo apt-get build-dep python" on my Debian system
and it'll go fetch a C compiler and all the necessary bits and bobs
for building Python from source. (In fact, I did exactly that
recently, as part of setting up a buildbot.) On Windows you would have
to download the right compiler (probably some version of MS Visual
Studio Express, if you want to replicate the python.org binaries),
manually fetch any libraries you need, etc. It's more of a social
difference than a technical one, but it does mean that your average
Linux user is more likely to understand "Type ./configure
--with-some-cool-feature to enable SomeCoolFeature" than your average
Windows user is.

ChrisA



More information about the Python-list mailing list