https://bugzilla.wikimedia.org/show_bug.cgi?id=72266

            Bug ID: 72266
           Summary: User::isAnon should not cause an unnecessary load()
                    call
           Product: MediaWiki
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: General/Unknown
          Assignee: [email protected]
          Reporter: [email protected]
       Web browser: ---
   Mobile Platform: ---

The current implementation of User::isAnon() causes the user details to be
loaded if the user is not anonymous. This can be expensive and should be
avoided, especially since the logging code calls isAnon() all the time. This
has resulted in some defensive coding in wfLogProfilingData which can in some
cases get the anon state wrong - see
https://gerrit.wikimedia.org/r/#/c/119942/12/includes/GlobalFunctions.php for
more context.

isAnon() should come with a guarantee (and unit tests) that load() is not
triggered.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to