* improved cache prefetch depending on distro

This commit is contained in:
Reinhard Pointner 2013-02-07 08:34:08 +00:00
parent 9de6d318c0
commit 44bd948156
10 changed files with 27 additions and 19 deletions

View File

@ -1,2 +1,2 @@
#!/bin/bash #!/bin/bash
java -Xmx256m -Dunixfs=false -DuseGVFS=true -DuseExtendedFileAttributes=true -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Dapplication.deployment=deb -Dapplication.dir=$HOME/.filebot -Djava.io.tmpdir=$HOME/.filebot/temp -Djna.library.path=/usr/share/filebot -Djava.library.path=/usr/share/filebot -jar /usr/share/filebot/FileBot.jar "$@" java -Xmx256m -Dunixfs=false -DuseGVFS=true -DuseExtendedFileAttributes=true -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Dapplication.deployment=deb -Dapplication.analytics=true -Dapplication.warmup=true -Dapplication.dir=$HOME/.filebot -Djava.io.tmpdir=$HOME/.filebot/temp -Djna.library.path=/usr/share/filebot -Djava.library.path=/usr/share/filebot -jar /usr/share/filebot/FileBot.jar "$@"

View File

@ -1,2 +1,2 @@
#!/bin/sh #!/bin/sh
java -Dunixfs=false -DuseExtendedFileAttributes=false -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Dapplication.deployment=ipkg -Dapplication.dir=$HOME/.filebot -Djava.io.tmpdir=$HOME/.filebot/temp -Djna.library.path=/usr/share/filebot -Djava.library.path=/usr/share/filebot -jar /usr/share/filebot/FileBot.jar "$@" java -Dunixfs=false -DuseExtendedFileAttributes=false -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Dapplication.deployment=ipkg -Dapplication.analytics=true -Dapplication.dir=$HOME/.filebot -Djava.io.tmpdir=$HOME/.filebot/temp -Djna.library.path=/usr/share/filebot -Djava.library.path=/usr/share/filebot -jar /usr/share/filebot/FileBot.jar "$@"

View File

@ -2,14 +2,15 @@
-Dapplication.deployment=msi -Dapplication.deployment=msi
-Dapplication.dir="%APPDATA%\FileBot" -Dapplication.dir="%APPDATA%\FileBot"
# FileBot feature settings
-Dapplication.warmup=true
-Dapplication.analytics=true
# network settings # network settings
-Djava.net.useSystemProxies=true -Djava.net.useSystemProxies=true
-Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultConnectTimeout=10000
-Dsun.net.client.defaultReadTimeout=60000 -Dsun.net.client.defaultReadTimeout=60000
# disable analytics
# -Dapplication.analytics=false
# use native shell for move/copy operations # use native shell for move/copy operations
-DuseNativeShell=true -DuseNativeShell=true

View File

@ -6,14 +6,15 @@
-DthreadPool=8 -DthreadPool=8
-Dunixfs=false -Dunixfs=false
# FileBot feature settings
-Dapplication.warmup=false
-Dapplication.analytics=true
# network settings # network settings
-Djava.net.useSystemProxies=true -Djava.net.useSystemProxies=true
-Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultConnectTimeout=10000
-Dsun.net.client.defaultReadTimeout=60000 -Dsun.net.client.defaultReadTimeout=60000
# disable analytics
# -Dapplication.analytics=false
# do not use native shell for move/copy operations # do not use native shell for move/copy operations
-DuseNativeShell=false -DuseNativeShell=false

View File

@ -3,14 +3,15 @@
-Dapplication.dir="%EXEDIR%" -Dapplication.dir="%EXEDIR%"
-Duser.home="%EXEDIR%" -Duser.home="%EXEDIR%"
# FileBot feature settings
-Dapplication.warmup=false
-Dapplication.analytics=true
# network settings # network settings
-Djava.net.useSystemProxies=true -Djava.net.useSystemProxies=true
-Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultConnectTimeout=10000
-Dsun.net.client.defaultReadTimeout=60000 -Dsun.net.client.defaultReadTimeout=60000
# disable analytics
# -Dapplication.analytics=false
# do not use native shell for move/copy operations # do not use native shell for move/copy operations
-DuseNativeShell=false -DuseNativeShell=false

View File

@ -6,4 +6,4 @@ dir_bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
# force JVM language and encoding settings # force JVM language and encoding settings
export LANG=en_US.utf8 export LANG=en_US.utf8
java -Xmx256m -Dunixfs=false -DuseGVFS=false -DuseExtendedFileAttributes=false -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Dapplication.deployment=portable "-Dapplication.dir=$dir_bin" "-Djava.io.tmpdir=$dir_bin/temp" "-Duser.home=$dir_bin" "-Djna.library.path=$dir_bin" "-Djava.library.path=$dir_bin" -Djava.util.prefs.PreferencesFactory=net.sourceforge.tuned.prefs.FilePreferencesFactory "-Dnet.sourceforge.tuned.prefs.file=$dir_bin/prefs.properties" -jar "$dir_bin/FileBot.jar" "$@" java -Xmx256m -Dunixfs=false -DuseGVFS=false -DuseExtendedFileAttributes=false -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Dapplication.deployment=portable -Dapplication.analytics=true -Dapplication.warmup=false "-Dapplication.dir=$dir_bin" "-Djava.io.tmpdir=$dir_bin/temp" "-Duser.home=$dir_bin" "-Djna.library.path=$dir_bin" "-Djava.library.path=$dir_bin" -Djava.util.prefs.PreferencesFactory=net.sourceforge.tuned.prefs.FilePreferencesFactory "-Dnet.sourceforge.tuned.prefs.file=$dir_bin/prefs.properties" -jar "$dir_bin/FileBot.jar" "$@"

View File

@ -1,2 +1,2 @@
#!/bin/bash #!/bin/bash
java -Xmx256m -Dunixfs=false -DuseGVFS=true -DuseExtendedFileAttributes=true -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Dapplication.update=skip -Dapplication.deployment=ppa -Dapplication.analytics=false -Dapplication.dir=$HOME/.filebot -Djava.io.tmpdir=$HOME/.filebot/temp -Djna.library.path=/opt/filebot -Djava.library.path=/opt/filebot -jar /opt/filebot/FileBot.jar "$@" java -Xmx256m -Dunixfs=false -DuseGVFS=true -DuseExtendedFileAttributes=true -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Dapplication.update=skip -Dapplication.deployment=ppa -Dapplication.analytics=false -Dapplication.warmup=true -Dapplication.dir=$HOME/.filebot -Djava.io.tmpdir=$HOME/.filebot/temp -Djna.library.path=/opt/filebot -Djava.library.path=/opt/filebot -jar /opt/filebot/FileBot.jar "$@"

View File

@ -24,6 +24,7 @@
<resources> <resources>
<property name="application.deployment" value="webstart" /> <property name="application.deployment" value="webstart" />
<property name="application.update" value="skip" /> <property name="application.update" value="skip" />
<property name="application.warmup" value="false" />
<property name="unixfs" value="false" /> <property name="unixfs" value="false" />
<property name="useNativeShell" value="false" /> <property name="useNativeShell" value="false" />
<property name="useExtendedFileAttributes" value="false" /> <property name="useExtendedFileAttributes" value="false" />

View File

@ -27,6 +27,7 @@ import java.security.PermissionCollection;
import java.security.Permissions; import java.security.Permissions;
import java.security.Policy; import java.security.Policy;
import java.security.ProtectionDomain; import java.security.ProtectionDomain;
import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
@ -175,7 +176,7 @@ public class Main {
} }
// pre-load certain resources in the background // pre-load certain resources in the background
if (!"skip".equals(System.getProperty("application.warmup"))) { if (Boolean.parseBoolean(System.getProperty("application.warmup"))) {
warmupCachedResources(); warmupCachedResources();
} }
@ -316,6 +317,10 @@ public class Main {
MediaDetection.stripReleaseInfo(dummy, true); MediaDetection.stripReleaseInfo(dummy, true);
MediaDetection.matchSeriesByName(dummy, -1); MediaDetection.matchSeriesByName(dummy, -1);
MediaDetection.matchMovieName(dummy, true, -1); MediaDetection.matchMovieName(dummy, true, -1);
Collection<File> empty = Collections.emptyList();
MediaDetection.matchSeriesByDirectMapping(empty);
WebServices.TheTVDB.getLocalIndex();
} catch (Exception e) { } catch (Exception e) {
Logger.getLogger(getClass().getName()).log(Level.WARNING, e.getMessage(), e); Logger.getLogger(getClass().getName()).log(Level.WARNING, e.getMessage(), e);
} }
@ -415,8 +420,7 @@ public class Main {
/** /**
* Initialize default SecurityManager and grant all permissions via security policy. * Initialize default SecurityManager and grant all permissions via security policy. Initialization is required in order to run {@link ExpressionFormat} in a secure sandbox.
* Initialization is required in order to run {@link ExpressionFormat} in a secure sandbox.
*/ */
private static void initializeSecurityManager() { private static void initializeSecurityManager() {
try { try {

View File

@ -53,7 +53,7 @@ public final class WebServices {
public static final SerienjunkiesClient Serienjunkies = new SerienjunkiesClient(getApplicationProperty("serienjunkies.apikey")); public static final SerienjunkiesClient Serienjunkies = new SerienjunkiesClient(getApplicationProperty("serienjunkies.apikey"));
// extended TheTVDB module with local search // extended TheTVDB module with local search
public static final TheTVDBClient TheTVDB = new TheTVDBClientWithLocalSearch(getApplicationProperty("thetvdb.apikey")); public static final TheTVDBClientWithLocalSearch TheTVDB = new TheTVDBClientWithLocalSearch(getApplicationProperty("thetvdb.apikey"));
// movie dbs // movie dbs
public static final IMDbClient IMDb = new IMDbClient(); public static final IMDbClient IMDb = new IMDbClient();
@ -124,7 +124,7 @@ public final class WebServices {
} }
private static class TheTVDBClientWithLocalSearch extends TheTVDBClient { public static class TheTVDBClientWithLocalSearch extends TheTVDBClient {
public TheTVDBClientWithLocalSearch(String apikey) { public TheTVDBClientWithLocalSearch(String apikey) {
super(apikey); super(apikey);
@ -134,7 +134,7 @@ public final class WebServices {
private static LocalSearch<SearchResult> localIndex; private static LocalSearch<SearchResult> localIndex;
private synchronized LocalSearch<SearchResult> getLocalIndex() throws IOException { public synchronized LocalSearch<SearchResult> getLocalIndex() throws IOException {
if (localIndex == null) { if (localIndex == null) {
// fetch data dump // fetch data dump
TheTVDBSearchResult[] data = MediaDetection.releaseInfo.getTheTVDBIndex(); TheTVDBSearchResult[] data = MediaDetection.releaseInfo.getTheTVDBIndex();