• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

woothemes / woocommerce / 8098 / 5
23%
master: 53%

Build:
Build:
LAST BUILD BRANCH: discount-calculation
DEFAULT BRANCH: master
Ran 18 Jul 2016 09:01AM UTC
Files 141
Run time 12s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Jul 2016 01:01PM UTC coverage: 22.114%. First build
WP_VERSION=latest WP_MULTISITE=0

push

travis-ci

rodrigoprimo
Cache the result of WC_Comments::wp_count_comments() in a transient

The query to count comments inside WC_Comments::wp_count_comments() is super slow when the site has a significant number of comments (for example, this query takes about 5s to run on WooCommerce.com with 70k comments) and this is a problem specially considering that this method is called on every admin page.

This commit changes WC_Comments::wp_count_comments() to store the comments count in a transient. With this change, the method will run the query to count comments only if the number of comments or their statuses had changed. Before this commit, WC_Comments::wp_count_comments() would run the database query every time a admin page was requested.

6347 of 28701 relevant lines covered (22.11%)

1.24 hits per line

Source Files on job 8098.5 (WP_VERSION=latest WP_MULTISITE=0)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 8098
  • Travis Job 8098.5
  • 7318235f on github
  • Next Job for WP_VERSION=latest WP_MULTISITE=0 on code-style/improve-wp-count-comments (#8099.2)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc