Company
Date Published
Author
-
Word count
1397
Language
English
Hacker News points
None

Summary

Implementing a new feature or switching libraries can lead to performance issues, as experienced when transitioning the Bolt server to use Boost.Asio for WebSocket support in Memgraph. This process revealed the complexity of networking and the critical role of profilers such as Callgrind and gperftools in identifying performance bottlenecks. Initially, the handwritten Bolt server required modification to accommodate WebSocket, and the shift to Boost.Asio introduced unexpected latency issues. Profiling tools helped pinpoint a problem with the send function, where the MSG_MORE flag was not properly set, causing inefficient data transmission. Correcting this oversight improved performance, though some throughput challenges remained. The experience underscored the importance of understanding both the intricacies of networking tools and the strengths and limitations of different profiling techniques, highlighting the nuanced challenges and learning opportunities present in software engineering with C++, POSIX, and networking.