Skip to content

[parallel-queries] Remove the attribute cache from the CrateStore #50508

Closed
@michaelwoerister

Description

@michaelwoerister
Member

The CStore maintains a cache of decoded item attributes which:

  • is an instance of shared mutable state that we'd like to avoid and
  • is largely unused at this point because item attributes are also cached via the item_attrs query.

The remaining instances where the CrateMetadata::get_item_attrs() is called directly should not be performance critical. To solve this issue:

  • Remove the attribute_cache field from CrateMetadata and make things compile again
  • Open a PR so that we can due a performance test in order to verify that this indeed does not regress compile times.

cc @rust-lang/wg-compiler-performance

Activity

added
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
C-enhancementCategory: An issue proposing an enhancement or a PR with one.
E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
on May 7, 2018
whitfin

whitfin commented on May 8, 2018

@whitfin
Contributor

Hi @michaelwoerister! I took a shot at this here. From my testing everything appears to work that I can see. If you have any advice I'd appreciate it :)

added a commit that references this issue on May 8, 2018

Auto merge of #50528 - whitfin:issue-50508, r=<try>

abed56d
added 4 commits that reference this issue on May 16, 2018

Auto merge of #50528 - whitfin:issue-50508, r=<try>

f3f0922

Auto merge of #50528 - whitfin:issue-50508, r=michaelwoerister

c3733a7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.WG-compiler-performanceWorking group: Compiler Performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @michaelwoerister@whitfin

      Issue actions

        [parallel-queries] Remove the attribute cache from the CrateStore · Issue #50508 · rust-lang/rust