Bugzilla #52206: small performance improvements by declaring some class members as static Patch by Alexis Giotis, applied with minor modifications