GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Unacceptably long compile times for Map.ofEntries · Issue #7023 · typetools/checker-framework

Unacceptably long compile times for Map.ofEntries #7023

New issue
Copy link
New issue
Copy link
Closed
#8070
Closed
Unacceptably long compile times for Map.ofEntries#7023
#8070
Copy link
Assignees
smillst

Description

@mspielberg
mspielberg
opened on Apr 3, 2025
Issue body actions

Compiling the following source file takes an unacceptably long time to typecheck (~90 seconds for a 32-line file with one declaration):

import java.util.Map;

public class MyTest {
    private static final Map<Class<Throwable>, Map.Entry<Integer, String>> testOutput =
        Map.ofEntries(
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, "")),
                Map.entry(Throwable.class, Map.entry(0, ""))
        );
}

This is a minimization of a more complicated piece of real production code that we use to translate exceptions to relevant error codes and error messages. Attempting to build the actual project times out during compilation after 30 minutes.

Test invocation:

❯ CHECKERFRAMEWORK=./checker-framework-3.49.2/
❯ time javac \
 -version -Aversion -AprintGitProperties \
-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED \
-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \
-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
-processorpath $CHECKERFRAMEWORK/checker/dist/checker.jar \
-cp $CHECKERFRAMEWORK/checker/dist/checker-qual.jar \
-processor org.checkerframework.checker.nullness.NullnessChecker MyTest.java
javac 21.0.6
git.branch=master
git.build.host=tern.cs.washington.edu
[email protected]
git.build.user.name=Suzanne Millstein
git.build.version=3.49.2
git.closest.tag.commit.count=7779
git.closest.tag.name=after-reformatting
git.commit.id=ea56a88a5970c0ac8a38e46c9de0f0975e2d36f0
git.commit.id.abbrev=ea56a88
git.commit.id.describe=after-reformatting-7779-gea56a88-dirty
git.commit.message.full=Update version of Java used during release to match what is installed on tern.\n
git.commit.message.short=Update version of Java used during release to match what is installed on tern.
git.commit.time=2025-04-01T11\:08\:44-0700
[email protected]
git.commit.user.name=Suzanne Millstein
git.dirty=true
git.remote.origin.url=/scratch/smillst/cf-release/interm/checker-framework
git.tags=
git.total.commit.count=19193
Note: Checker Framework 3.49.2
javac -version -Aversion -AprintGitProperties          -processorpath  -cp     110.31s user 2.29s system 123% cpu 1:31.46 total

Activity

  1. mernst
    assigned
    smillst
    on Apr 4, 2025
  2. mernst
    closed this as completedin #8070on Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @smillst
    smillst

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.