mirror of
https://github.com/sismics/docs.git
synced 2024-11-22 14:07:55 +01:00
#24: High performance is not going to happen on HSQLDB
This commit is contained in:
parent
36b5bf3bb2
commit
6d73554967
@ -183,7 +183,7 @@ public class DocumentDao {
|
||||
Map<String, Object> parameterMap = new HashMap<String, Object>();
|
||||
List<String> criteriaList = new ArrayList<String>();
|
||||
|
||||
StringBuilder sb = new StringBuilder("select distinct d.DOC_ID_C c0, d.DOC_TITLE_C c1, d.DOC_DESCRIPTION_C c2, d.DOC_CREATEDATE_D c3, d.DOC_LANGUAGE_C c4, ");
|
||||
StringBuilder sb = new StringBuilder("select d.DOC_ID_C c0, d.DOC_TITLE_C c1, d.DOC_DESCRIPTION_C c2, d.DOC_CREATEDATE_D c3, d.DOC_LANGUAGE_C c4, ");
|
||||
sb.append(" (select count(s.SHA_ID_C) from T_SHARE s, T_ACL ac where ac.ACL_SOURCEID_C = d.DOC_ID_C and ac.ACL_TARGETID_C = s.SHA_ID_C and ac.ACL_DELETEDATE_D is null and s.SHA_DELETEDATE_D is null) c5, ");
|
||||
sb.append(" (select count(f.FIL_ID_C) from T_FILE f where f.FIL_DELETEDATE_D is null and f.FIL_IDDOC_C = d.DOC_ID_C) c6 ");
|
||||
sb.append(" from T_DOCUMENT d ");
|
||||
|
@ -104,10 +104,10 @@ public class DirectoryUtil {
|
||||
*/
|
||||
private static File getDataSubDirectory(String subdirectory) {
|
||||
File baseDataDir = getBaseDataDirectory();
|
||||
File faviconDirectory = new File(baseDataDir.getPath() + File.separator + subdirectory);
|
||||
if (!faviconDirectory.isDirectory()) {
|
||||
faviconDirectory.mkdirs();
|
||||
File directory = new File(baseDataDir.getPath() + File.separator + subdirectory);
|
||||
if (!directory.isDirectory()) {
|
||||
directory.mkdirs();
|
||||
}
|
||||
return faviconDirectory;
|
||||
return directory;
|
||||
}
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ public final class EMF {
|
||||
properties.load(is);
|
||||
return properties;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
} catch (IOException | IllegalArgumentException e) {
|
||||
log.error("Error reading hibernate.properties", e);
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
<org.slf4j.version>1.6.4</org.slf4j.version>
|
||||
<org.slf4j.jcl-over-slf4j.version>1.6.6</org.slf4j.jcl-over-slf4j.version>
|
||||
<junit.junit.version>4.7</junit.junit.version>
|
||||
<org.hsqldb.hsqldb.version>2.3.0</org.hsqldb.hsqldb.version>
|
||||
<org.hsqldb.hsqldb.version>2.3.3</org.hsqldb.hsqldb.version>
|
||||
<com.sun.jersey.version>1.17</com.sun.jersey.version>
|
||||
<org.mindrot.jbcrypt>0.3m</org.mindrot.jbcrypt>
|
||||
<org.subethamail.subethasmtp.version>3.1.6</org.subethamail.subethasmtp.version>
|
||||
|
@ -203,6 +203,53 @@
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<!-- Stress profile -->
|
||||
<profile>
|
||||
<id>stress</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>env</name>
|
||||
<value>stress</value>
|
||||
</property>
|
||||
</activation>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/stress/resources</directory>
|
||||
<filtering>false</filtering>
|
||||
<excludes>
|
||||
<exclude>**/config.properties</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/stress/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>**/config.properties</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<scanIntervalSeconds>0</scanIntervalSeconds>
|
||||
<webAppConfig>
|
||||
<contextPath>/docs-web</contextPath>
|
||||
<extraClasspath>target/classes;../docs-core/target/classes</extraClasspath>
|
||||
<overrideDescriptor>src/stress/main/webapp/web-override.xml</overrideDescriptor>
|
||||
</webAppConfig>
|
||||
<stopKey>STOPKEY</stopKey>
|
||||
<stopPort>1099</stopPort>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<!-- Production profile -->
|
||||
<profile>
|
||||
<id>prod</id>
|
||||
|
16
docs-web/src/stress/main/webapp/web-override.xml
Normal file
16
docs-web/src/stress/main/webapp/web-override.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app id="docs"
|
||||
xmlns="http://java.sun.com/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||
version="3.0">
|
||||
|
||||
<!-- Override init parameter to avoid nasty file locking issue on windows. -->
|
||||
<servlet>
|
||||
<servlet-name>default</servlet-name>
|
||||
<init-param>
|
||||
<param-name>useFileMappedBuffer</param-name>
|
||||
<param-value>false</param-value>
|
||||
</init-param>
|
||||
</servlet>
|
||||
</web-app>
|
3
docs-web/src/stress/resources/config.properties
Normal file
3
docs-web/src/stress/resources/config.properties
Normal file
@ -0,0 +1,3 @@
|
||||
api.current_version=${project.version}
|
||||
api.min_version=1.0
|
||||
db.version=10
|
1
docs-web/src/stress/resources/hibernate.properties
Normal file
1
docs-web/src/stress/resources/hibernate.properties
Normal file
@ -0,0 +1 @@
|
||||
\ugggg
|
8
docs-web/src/stress/resources/log4j.properties
Normal file
8
docs-web/src/stress/resources/log4j.properties
Normal file
@ -0,0 +1,8 @@
|
||||
log4j.rootCategory=WARN, CONSOLE, MEMORY
|
||||
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.CONSOLE.layout.ConversionPattern=%d{DATE} %p %l %m %n
|
||||
log4j.appender.MEMORY=com.sismics.util.log4j.MemoryAppender
|
||||
log4j.appender.MEMORY.size=1000
|
||||
|
||||
log4j.logger.com.sismics=DEBUG
|
Loading…
Reference in New Issue
Block a user