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

Vyom Mani Tiwari commented on RANGER-5432:
------------------------------------------

I investigated why the test 
org.apache.ranger.admin.client.TestRangerAdminRESTClient was taking 
significantly longer to execute on my Mac laptop.
I discovered that the slowdown occurred specifically when running the test with 
Java version 1.8.0_401:

Java(TM) SE Runtime Environment (build 1.8.0_401-b10)

In this configuration, the test took approximately 200 seconds:
[INFO] Tests run: 40, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 200.927 
s

However, the same test completed much faster under the following conditions:

With JDK 17: ~1.9 seconds
[INFO] Time elapsed: 1.929 s

With earlier JDK 8 builds (not 8u401): ~0.5 seconds
[INFO] Time elapsed: 0.479 s

After further research, I identified the root cause: JDK 8u401 contains a 
critical bug (JDK-8334725) that causes the C2 compiler to become stuck in an 
infinite optimization loop.This bug appears to be the primary reason for the 
severe performance degradation observed on my laptop.

Although switching to a different JDK version resolves the issue and the test 
now runs quickly, I believe there is still some room for further optimization 
of the test itself.

> Improve unit test execution time in Ranger build
> ------------------------------------------------
>
>                 Key: RANGER-5432
>                 URL: https://issues.apache.org/jira/browse/RANGER-5432
>             Project: Ranger
>          Issue Type: Bug
>          Components: Ranger
>    Affects Versions: 3.0.0
>            Reporter: Dineshkumar Yadav
>            Assignee: Dhaval Shah
>            Priority: Major
>
> During the Ranger build process, unit test execution is taking longer than 
> expected, resulting in increased build times. This task focuses on 
> identifying the root cause of the slowness and implementing optimizations to 
> improve unit test performance. The goal is to reduce overall build duration 
> while ensuring test stability and coverage are not impacted.
> one of the Test file is listed below 
> TestRangerAdminRESTClient.java 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to