From: Radek Czajka Date: Fri, 20 Apr 2012 10:09:19 +0000 (+0200) Subject: set limit for search heap, X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/69b59e1dc5d93547a298830fc439a5608ebd6596?ds=inline set limit for search heap, disable PDF and MOBI by default --- diff --git a/apps/search/index.py b/apps/search/index.py index b689c763c..f608a5bec 100644 --- a/apps/search/index.py +++ b/apps/search/index.py @@ -18,7 +18,7 @@ from lucene import SimpleFSDirectory, NIOFSDirectory, IndexWriter, IndexReader, # KeywordAnalyzer # Initialize jvm -JVM = initVM(CLASSPATH) +JVM = initVM(CLASSPATH, maxheap=settings.JVM_MAXHEAP) import sys import os diff --git a/doc/installation.rst b/doc/installation.rst index da0a9a83c..78ca3ccbb 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -8,9 +8,10 @@ Requirements * `Python 2.6+ `_ * Everyting from the ``requirements.txt`` file * a library for your database of choice - (see `DBs supported by Django `_) -* `puLucene `_ for search -* Librarian dependencies, see lib/librarian/README.md + (see `DBs supported by Django `_) +* `pyLucene `_ for search +* Librarian dependencies for generating PDF and MOBI files, + see lib/librarian/README.md Installation diff --git a/wolnelektury/settings/contrib.py b/wolnelektury/settings/contrib.py index ba6603b9e..654066a96 100644 --- a/wolnelektury/settings/contrib.py +++ b/wolnelektury/settings/contrib.py @@ -1 +1,4 @@ HONEYPOT_FIELD_NAME = 'miut' +PAGINATION_INVALID_PAGE_RAISES_404 = True +THUMBNAIL_QUALITY = 95 +TRANSLATION_REGISTRY = "wolnelektury.translation" diff --git a/wolnelektury/settings/custom.py b/wolnelektury/settings/custom.py index 9abb5edd3..552188a6f 100644 --- a/wolnelektury/settings/custom.py +++ b/wolnelektury/settings/custom.py @@ -1,19 +1,16 @@ -PAGINATION_INVALID_PAGE_RAISES_404 = True -THUMBNAIL_QUALITY = 95 -TRANSLATION_REGISTRY = "wolnelektury.translation" - - # seconds until a changes appears in the changes api API_WAIT = 10 # limit number of filtering tags MAX_TAG_LIST = 6 +NO_SEARCH_INDEX = False NO_BUILD_EPUB = False NO_BUILD_TXT = False -NO_BUILD_PDF = False -NO_BUILD_MOBI = False -NO_SEARCH_INDEX = False +# You'll need XeLaTeX to generate PDF files. +NO_BUILD_PDF = True +# You'll need Calibre installed to generate MOBI files. +NO_BUILD_MOBI = True ALL_EPUB_ZIP = 'wolnelektury_pl_epub' ALL_PDF_ZIP = 'wolnelektury_pl_pdf' @@ -31,3 +28,6 @@ CATALOGUE_CUSTOMPDF_RATE_LIMIT = '1/m' # set to 'new' or 'old' to skip time-consuming test # for TeX morefloats library version LIBRARIAN_PDF_MOREFLOATS = None + +# Max memory used by search +JVM_MAXHEAP = '256m'