Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes too slow to build dominator tree #2725

Open
zienn opened this issue Nov 26, 2024 · 1 comment
Open

Sometimes too slow to build dominator tree #2725

zienn opened this issue Nov 26, 2024 · 1 comment

Comments

@zienn
Copy link

zienn commented Nov 26, 2024

Description

Build dominator tree cost too much time in some bad case

Steps to Reproduce

I can provide a hprof file, and build as below

heapDumpFile.openHeapGraph().use { graph ->
    val heapAnalyzer = HeapAnalyzer(OnAnalysisProgressListener.NO_OP)

    val weakAndFinalizerRefs = EnumSet.of(REFERENCES, FINALIZER_WATCHDOG_DAEMON)
    val ignoredRefs = ReferenceMatcher.fromListBuilders(weakAndFinalizerRefs).map { matcher ->
        matcher as IgnoredReferenceMatcher
    }

    val dominatorTree = ObjectDominators().buildDominatorTree(graph, ignoredRefs)
}

Expected behavior: [finish in few minutes]

In fact, it takes hundreds of minutes

Version Information

  • LeakCanary version: 3.0-beta-8
  • Android OS version: 12
  • Gradle version: 8.0

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

@zienn
Copy link
Author

zienn commented Nov 26, 2024

Here is the hprof file download link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant