Break out websockets
When running clang build analyzer it shows that one of the largest
templates in the Redfish compile unit (which is also the slowest compile
unit) is actually the beast websocket instantiations, taking about 6
seconds to compile on their own.
Luckily, the websocket layer is already split into Websocket and
WebsocketImpl classes that we inherited from crow. Unfortunately, crow
puts these two classes into the same file. So.
1. Move the WebSocketImpl class into its own header.
2. Move the websocket() upgrade routes in the websocket routing rule
into their own compile unit to take advantage of only needing
WebsocketImpl in this compile unit.
Tested: Drops build time by several seconds depending on what other
level of optimizations are present (1:15 -> 1:00)
[1] https://github.com/aras-p/ClangBuildAnalyzer
Change-Id: Ia0445eae4a793bb4ccb28136f30d2a05662c529c
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/meson.build b/meson.build
index a2c397e..440d9ee 100644
--- a/meson.build
+++ b/meson.build
@@ -356,6 +356,7 @@
srcfiles_bmcweb = files(
'http/mutual_tls.cpp',
+ 'http/routing/websocketrule.cpp',
'redfish-core/src/dbus_log_watcher.cpp',
'redfish-core/src/error_message_utils.cpp',
'redfish-core/src/error_messages.cpp',