Title: Performance improvement needed
Last modified: August 26, 2026

---

# Performance improvement needed

 *  [locker17](https://wordpress.org/support/users/locker17/)
 * (@locker17)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/performance-improvement-needed/)
 * With the use of your plugin my site loads 457 kB uncompressed better messages
   CSS, site-wide. How to improve that?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [Andrij Tkachenko](https://wordpress.org/support/users/andrijtkachenko/)
 * (@andrijtkachenko)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/performance-improvement-needed/#post-19003229)
 * Hi,
   457 kB is the size of the file on disk, not what actually gets transferred.
   That CSS compresses down to about 54 kB with brotli, or 60 kB with gzip.If your
   site is really sending 457 kB, compression is not enabled on your server. Open
   DevTools → Network, reload, find bp-messages.min.css and compare the Transferred
   column with the Size column. If both show ~457 kB, nothing is being compressed—
   and that affects every CSS and JS file on your site, not just this one.Enabling
   gzip or brotli is done at the server level (nginx, Apache, your caching plugin,
   or your CDN). Your host can turn it on for you if you are not sure where.I cannot
   make that file any smaller. It covers the whole messenger interface — conversations,
   composer, file uploads, emoji picker, settings— and there is nothing in it to
   strip out. Compression is what brings it down to a reasonable size.The file loads
   on all pages because messenger elements can show up anywhere. The browser caches
   it after the first page, so it is one download per visitor rather than one per
   page.Thanks!
 *  Thread Starter [locker17](https://wordpress.org/support/users/locker17/)
 * (@locker17)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/performance-improvement-needed/#post-19003348)
 * I checked it with dev tools and you are right, I get the CSS file with 60kb something.
   I cant remember on which page or when I saw the uncompressed file with around
   450kb unfortunately.
   Anyway, the bp-better-messages-free.min.js file is 1.68 
   MB in size and this is the much bigger part. I checked, this file is loaded everywhere
   even on non message pages. The message notification bell?1.68 MB of JavaScript
   has to be parsed and compiled on every page load so this is an issue.Does the
   plugin support a lightweight launcher — a small stub that renders the floating
   bubble and only fetches the full bundle when a user opens a conversation?
 *  Plugin Support [Andrij Tkachenko](https://wordpress.org/support/users/andrijtkachenko/)
 * (@andrijtkachenko)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/performance-improvement-needed/#post-19003364)
 * Hi,
 * You are right that the JS loads on every page. It is there for the unread counter
   and new message notifications, which can appear anywhere on the site.
 * There is no lightweight launcher stub at the moment, the main bundle loads upfront.
   The heavy parts are already split into separate chunks that only download when
   actually used: calls, the file uploader, image editor, emoji picker, lightbox,
   HEIF conversion and sounds. What is left in the main bundle is the messenger 
   core.
 * Compressed it is roughly 400 kB over the wire rather than 1.68 MB, and it is 
   cached after the first page. But you are right that parse and compile cost is
   paid on every page load, and compression does not help with that.
 * If you only need the messenger on certain pages, you can unload it elsewhere:
 *     ```wp-block-code
       add_action( 'wp_enqueue_scripts', function () {    if ( is_singular( 'post' ) ) {        wp_dequeue_script( 'better-messages' );        wp_dequeue_style( 'better-messages' );    }}, 100 );
       ```
   
 * Adapt the condition to match your site. On pages where it is unloaded the unread
   counter and new message notifications will not work.
   Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fperformance-improvement-needed%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/bp-better-messages/assets/icon-256x256.png?rev=2835105)
 * [Better Messages - Chat Rooms, Group Chat, Private Messages & AI Chat Bots](https://wordpress.org/plugins/bp-better-messages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bp-better-messages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bp-better-messages/)
 * [Active Topics](https://wordpress.org/support/plugin/bp-better-messages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bp-better-messages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bp-better-messages/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Andrij Tkachenko](https://wordpress.org/support/users/andrijtkachenko/)
 * Last activity: [1 week, 4 days ago](https://wordpress.org/support/topic/performance-improvement-needed/#post-19003364)
 * Status: not a support question