[ https://issues.apache.org/jira/browse/CXF-7940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Colm O hEigeartaigh reassigned CXF-7940: ---------------------------------------- Assignee: Colm O hEigeartaigh > FileUtils.delete dramatically slowdown WildFly server shutdown > -------------------------------------------------------------- > > Key: CXF-7940 > URL: https://issues.apache.org/jira/browse/CXF-7940 > Project: CXF > Issue Type: Bug > Components: Core > Affects Versions: 3.0.0-milestone1, 3.3.0 > Environment: *OS*: Windows > *AppServer*: WildFly 10.0.0.1.Final > *CXF*: cxf-core-3.1.6 > *jbossws-cxf*: jbossws-cxf-server-5.1.5.Final > Reporter: Viacheslav > Assignee: Colm O hEigeartaigh > Priority: Minor > > *Brief introduction:* > We use WildFly server. > As we know, WildFly based on JBoss Application Server. > WildFly have an integration with Apache CXF through > "[jbossws-cxf|https://github.com/jbossws/jbossws-cxf]" project. > When WildFly server is stops we see repeated invokes of > WSDLFilePublisher.java#unpublishWsdlFiles that invoke FileUtils#removeDir > *Cause of problems:* > When the method FileUtils#removeDir is invoked then we see the invoke of > FileUtils#delete: > https://github.com/apache/cxf/blob/master/core/src/main/java/org/apache/cxf/helpers/FileUtils.java#L254. > We see some strange code: > {code:java} > public static void delete(File f, boolean inShutdown) { > if (!f.delete()) { > if (isWindows()) { > System.gc(); > } > {code} > This leads to dramatically slowdown of WildFly server shutdown on Windows > systems. > For example, our WildFly server stops in 2781ms without this call AND stops > in 119882ms with this call (~ 43 times slower). > *Questions:* > What is the reason of this code? > Is it bug? What are the disadvantages of removing this code? > Last changes of this code from Git Blame: > [commit|https://github.com/apache/cxf/commit/88a9451b92180609b7bb93d0314bc8384f0c24a4#diff-b620deea897fb467b6f42abd1c32b7f2R138]. -- This message was sent by Atlassian JIRA (v7.6.3#76005)