Skip to content

Commit

Permalink
sepinf-inc#2304: consider timeOutPerThousandMessages = 4 based on com…
Browse files Browse the repository at this point in the history
…parison with WhatsApp databases
  • Loading branch information
aberenguel committed Aug 23, 2024
1 parent b964f8b commit 13904e3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions iped-app/resources/config/conf/ParsingTaskConfig.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ parseCorruptedFiles = true

# Minimum timeout (seconds) while parsing files.
# To this baseline will be added the result of timeOutPerMB * file size in MB
# or timeOutPerHundredMessages * messages_count / 100 (see next parameters).
# or timeOutPerThousandMessages * messages_count / 100 (see next parameters).
# After the timeout, the file's raw strings will be indexed.
timeOut = 180

# Timeout (seconds) for each Megabyte of the file being parsed.
# Total_Timeout = timeOut + timeOutPerMB * <file_size_in_MB>
timeOutPerMB = 2

# Timeout (seconds) for each 100 messages in UFED Chat
# Total_Timeout = timeOut + timeOutPerHundredMessages * <messages_count> / 100
timeOutPerHundredMessages = 2
# Timeout (seconds) for each 1000 messages in UFED Chat
# Total_Timeout = timeOut + timeOutPerThousandMessages * <messages_count> / 1000
timeOutPerThousandMessages = 4

# Minimum size of raw strings extracted from unknown files for indexing.
minRawStringSize = 4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class ParsingTaskConfig extends AbstractTaskPropertiesConfig {
private boolean parseUnknownFiles = true;
private int timeOut = 180;
private int timeOutPerMB = 2;
private int timeOutPerHundredMessages = 2;
private int timeOutPerThousandMessages = 4;
private int minRawStringSize = 4;
private boolean storeTextCacheOnDisk = true;
private boolean sortPDFChars;
Expand Down Expand Up @@ -86,9 +86,9 @@ public void processProperties(UTF8Properties properties) {
timeOutPerMB = Integer.valueOf(value.trim());
}

value = properties.getProperty("timeOutPerHundredMessages"); //$NON-NLS-1$
value = properties.getProperty("timeOutPerThousandMessages"); //$NON-NLS-1$
if (value != null) {
timeOutPerHundredMessages = Integer.valueOf(value.trim());
timeOutPerThousandMessages = Integer.valueOf(value.trim());
}

value = properties.getProperty("minRawStringSize"); //$NON-NLS-1$
Expand Down Expand Up @@ -151,8 +151,8 @@ public int getTimeOutPerMB() {
return timeOutPerMB;
}

public int getTimeOutPerHundredMessages() {
return timeOutPerHundredMessages;
public int getTimeOutPerThousandMessages() {
return timeOutPerThousandMessages;
}

public boolean isStoreTextCacheOnDisk() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public ParsingReader(Parser parser, InputStream stream, Metadata metadata, Parse
int timeOutByMessages = 0;
Integer messagesCount = metadata.getInt(UfedXmlReader.UFED_IM_COUNT);
if (messagesCount != null) {
timeOutByMessages = messagesCount * parsingConfig.getTimeOutPerHundredMessages() / 100;
timeOutByMessages = messagesCount * parsingConfig.getTimeOutPerThousandMessages() / 1000;
}

pipedReader = new FastPipedReader(128 * 1024, parsingConfig.getTimeOut() + timeOutBySize + timeOutByMessages);
Expand Down

0 comments on commit 13904e3

Please sign in to comment.