Skip to content

reference_accesses can be very slow #3183

@sergisiso

Description

@sergisiso

This is found testing just the fronted part of time psyclone ukca_aero_bug/ukca_aero_ctl.F90

On master it takes: 1m50.579s !

Most of the time is doing reference_accesses. And this is not calling it multiple times, a single call to the routine.refernce_accesses takes multiple seconds. Which is done multiple times in the fronted through the symbol_table.py::_validate_remove_routinesymbol

If I go back before all recent changes to call reference_access to look for the routine declarations, it is still slow, but an improvement.
0m52.943s

If I prune the call.reference_access altogher it's significantly faster.
0m13.700s

One think to notice is that symbol_table.py::_validate_remove_routinesymbol does not need the access types, so we could implement a faster "get_me_all_references" method wihtout the map updates. However, the problem happens again when applying transformations, there we may need them.

Metadata

Metadata

Assignees

No one assigned

    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