Avoid triggering PyROOT's finalSetup at import time · Issue #74 · rootpy/rootpy · GitHub
Skip to content

Avoid triggering PyROOT's finalSetup at import time #74

Description

@pwaller

This is a minor peeve. The name of the game is to make import rootpy no slower than import ROOT.

When you access a ROOT.* symbol for the first time (other than a few special ones), this can cause a lot of stuff to get searched for loaded, including dynamic libraries. This can be slow, especially on networked filesystems.

It's super annoying when "myrootapp --help" takes tens of seconds to show, and this issue aims to avoid that.

It's possible to wrap finalSetup so that defaults such as ROOT.TH1.SetDefaultSumw2() can be set without triggering it. We could provide a function to allow users to do attach additional setup functions just before finalSetup() time.

#47 (comment) is also motivated by this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions