Title: Optimization / Performance question
Last modified: October 25, 2022

---

# Optimization / Performance question

 *  Resolved [tdelsack](https://wordpress.org/support/users/tdelsack/)
 * (@tdelsack)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/optimization-performance-question/)
 * Hey Alex, great plugin – it’s working great on our install. Thanks for keeping
   it up to date!
 * I have q question regarding performance. Running the Performance Insights on 
   Chrome shows that loading the Sentry script is an expensive task – is there a
   way to optimize this? I have the sample rate in my wp-config.php to sample 30%
   of visitors.

Viewing 1 replies (of 1 total)

 *  Plugin Author [stayallive](https://wordpress.org/support/users/stayallive/)
 * (@stayallive)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/optimization-performance-question/#post-16134549)
 * Hey [@tdelsack](https://wordpress.org/support/users/tdelsack/),
 * Yeah the Sentry script is not the lightest, but also performance tracing requires
   quite some code to keep track of everything, the problem is also that you usually
   want the performance code to load ASAP to be able to capture everything. The 
   sample rate here is used client side to determine if performance tracing is collected
   for the visitor, but the SDK still needs to load to make that decision.
 * There is a lazy-loading version of the JS SDK: [https://docs.sentry.io/platforms/javascript/install/lazy-load-sentry/](https://docs.sentry.io/platforms/javascript/install/lazy-load-sentry/),
   however this does not support performance tracing because it cannot trace things
   when it’s not loaded of course 🙂 (and this version is also not supported by 
   this plugin)
 * In version 6 of the WordPress plugin I also dropped the ES5 compatible bundles(
   IE11 suppoert) to keep the bundles as small as possible. But further than that
   it’s on Sentry JS SDK team to reduce the overhead and bundle size.
 * This is not really an answer but hopefully explains a few things on why it is
   how it what it is.

Viewing 1 replies (of 1 total)

The topic ‘Optimization / Performance question’ is closed to new replies.

 * ![](https://ps.w.org/wp-sentry-integration/assets/icon-256x256.jpg?rev=1772463)
 * [Sentry for WordPress](https://wordpress.org/plugins/wp-sentry-integration/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-sentry-integration/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-sentry-integration/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-sentry-integration/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-sentry-integration/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [stayallive](https://wordpress.org/support/users/stayallive/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/optimization-performance-question/#post-16134549)
 * Status: resolved