DEV: Don't use chunked encoding in development mode (#13768)

DEV: Don’t use chunked encoding in development mode (#13768)

The express server and http-proxy seem to buffer quite a bit and that slows down message bus.

diff --git a/app/assets/javascripts/discourse/app/initializers/message-bus.js b/app/assets/javascripts/discourse/app/initializers/message-bus.js
index 2e2df03..2309ba0 100644
--- a/app/assets/javascripts/discourse/app/initializers/message-bus.js
+++ b/app/assets/javascripts/discourse/app/initializers/message-bus.js
@@ -86,7 +86,8 @@ export default {
     messageBus.baseUrl =
       siteSettings.long_polling_base_url.replace(/\/$/, "") + "/";
 
-    messageBus.enableChunkedEncoding = siteSettings.enable_chunked_encoding;
+    messageBus.enableChunkedEncoding =
+      isProduction() && siteSettings.enable_chunked_encoding;
 
     if (messageBus.baseUrl !== "/") {
       messageBus.ajax = function (opts) {

GitHub sha: 6d999fb0873e1c85745110a5c6cecee8a1fb0535

This commit appears in #13768 which was approved by pmusaraj. It was merged by tgxworld.