edubart / otclient

An alternative tibia client for otserv written in C++11 and Lua, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize
Other
640 stars 402 forks source link

move big functions from .h to .cpp #1183

Closed vfjpl closed 2 years ago

vfjpl commented 2 years ago

Move definition from .h to .cpp to speed up compile time. (color.h) is included in almost all translation units and this inline functions have to be parsed (compiled as weak symbol ?) every time.

diath commented 2 years ago

Usually inlining small functions that get called frequently is done for performance reasons to avoid function call overhead but looking at the client startup time difference (where these functions are used most frequently) with your changes there seems to be no significant impact so I guess it's fine.