isset() isn't a function, is_null() is a function - function calls are expensive.

This makes user_access() in the region of three times as fast and shaves 0.6% of page execution time off the default front page.

CommentFileSizeAuthor
#4 user_d6.patch537 bytesandypost
user.patch1.17 KBcatch
head.png380.09 KBcatch
patch.png398.24 KBcatch

Comments

catch’s picture

Status: Active » Needs review
jrchamp’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Quick fix

Because something that is_null == !isset when the item being evaluated is a variable, setting this to RTBC and tagging.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Thanks! Committed to HEAD.

andypost’s picture

Version: 7.x-dev » 6.x-dev
Status: Fixed » Needs review
StatusFileSize
new537 bytes

Lets backport this

jrchamp’s picture

Status: Needs review » Reviewed & tested by the community

Same RTBC justification as #2.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Committed to Drupal 6, thank you!

Status: Fixed » Closed (fixed)
Issue tags: -Performance, -Quick fix

Automatically closed -- issue fixed for 2 weeks with no activity.