[ 
https://issues.apache.org/jira/browse/TIKA-1743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14904602#comment-14904602
 ] 

Konstantin Gribov commented on TIKA-1743:
-----------------------------------------

[~bobpaulin], I have two ideas on the issue:
- by default use common thread pool, configured via and contained in TikaConfig 
as [~tpalsulich] suggested,
- you can pass thread pool for parser invocation via ParserContext with 
fallback to default if now thread pool/executor service in context.

Also {{o.a.tika.Tika#parse(InputStream, Metadate)}} produces 
{{o.a.tika.parser.ParsingReader}} and anonymous {{Executor}} with unbounded 
daemon thread creation.

> NetworkParser can create Unbounded Number of Threads
> ----------------------------------------------------
>
>                 Key: TIKA-1743
>                 URL: https://issues.apache.org/jira/browse/TIKA-1743
>             Project: Tika
>          Issue Type: Bug
>            Reporter: Bob Paulin
>
> The current NetworkParser class creates new instances of the Thread class 
> which each call to parse.  This could create an unbounded number of threads 
> created by this class.  I'd suggest replacing this logic with a 
> ThreadPoolExecutor and a configurable number of threads.  This will help 
> prevent creating an unbounded number of threads and allow the user to tune 
> performance to the hardware.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to