Skip to:
Content

bbPress.org

Opened 9 years ago

Closed 9 years ago

#2331 closed task (blessed) (fixed)

General code clean-up

Reported by: johnjamesjacoby Owned by:
Milestone: 2.4 Priority: normal
Severity: normal Version: 2.1
Component: Tools - Code Improvements Keywords:
Cc:

Description

Went hunting through trunk last night, and see some areas where code can be improved.

  • Use wp_parse_id_list() where appropriate
  • Use implode() instead of join() alias
  • Audit cache keys for correctness
  • Use strict false comparison for wp_cache_get() results
  • Improve $post_status array building, since it happens so frequently

Change History (6)

#1 @johnjamesjacoby
9 years ago

In 4896:

Use implode() instead of join() through-out project. See #2331.

#2 @johnjamesjacoby
9 years ago

In 4897:

Delete the correct 'bbpress_users' cache group for subscriptions and favorites. See #2331.

#3 @johnjamesjacoby
9 years ago

In 4898:

Cache clean-up:

  • Perform strict comparisons on wp_cache_get() results.
  • Add caching to bbp_get_topic_favoriters().
  • Use wp_parse_id_list() where appropriate in touched functions.
  • See #2331.

#4 @johnjamesjacoby
9 years ago

In 4899:

Query clean-up:

  • Move implode() calls out of queries and replace with variables.
  • Audit IN queries and implode/explode for wp_parse_id_list() usages.
  • See #2331.

#5 @johnjamesjacoby
9 years ago

In 4900:

Improve micro-performance of favorites and subscriptions by moving function calls after sanity checks. Also typecast the return value of respective get_topic_ids functions. See #2331.

#6 @johnjamesjacoby
9 years ago

  • Keywords needs-patch removed
  • Resolution set to fixed
  • Status changed from new to closed

All of the issues in the ticket are addressed. Resolving as fixed.

Note: See TracTickets for help on using tickets.