Skip to content

Eliminate redundant page loads when tracing outgoing references  #170

@vidyasilai

Description

@vidyasilai

Throughout the code, we perform calls to trace_refs on pages in order to see if they reference any other pages, and if so, perform some action for each outgoing reference specific to the context of that piece of the code. When a page has its outgoing references traced, it needs to be loaded from the PageCache in order to call trace_refs on its PageView.

However, this load and call to trace_refs is only necessary in two circumstances:

  1. The page has never had its outgoing references traced (i.e., it will be the first time trace_refs is called on the page).
  2. The page is confirmed to have outgoing references, so we need to call trace_refs if we want to perform some specific action per traced reference.

If a page is confirmed to have no outgoing references (i.e., we call trace_refs on the page for the first time and see that it yields no outgoing page references), performing this PageCache load is unnecessary, as we will call trace_refs only to perform no further action. Moreover, we need a way to eliminate these redundant loads.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions