4fcf732814
std::forward ensures that the arguments are perfectly forwarded to loadScript By reserving space in the features vector based on the size of scripts, we can avoid multiple memory allocations during the loop. If an exception occurs, returning an empty vector immediately clarifies that no scripts were loaded. Without reservation, each call to emplace_back could potentially trigger a reallocation if the current capacity is exceeded, which is costly in terms of performance. This leads to more efficient memory management and can significantly speed up the execution time when dealing with a large number of scripts. ![image](https://github.com/user-attachments/assets/3e290162-fb8b-4f00-a71b-6009494b2dab) |
||
---|---|---|
.. | ||
loaders/dotnet | ||
plugin_script_loader.cpp |