GlobalEventSet::fireEvent Performance

Create issue
Issue #737 new
Former user created an issue

Automatic migration. Original reporter: "fedyakin"

This function shows up as one of the biggest hotspots when profiling our engine. The cost of the function is actually in the string concatenation that builds the event name, not in the event dispatching or handling. It seems like it should be possible to refactor things, so that this method doesn't need to perform any string concatenation.

Reproducibility: N/A

Additional information: Originally reported in this thread

A few approaches that might work: 1) Allow users to disable the global event set 2) Modify the EventSet::fireEvent method to take the global event name 3) Reimplement event handling in the global event set to store events in a std::map<std::pair<String, String>, Event*> 4) Refactor the normal event set support identifying events be namespace and event.

OS: Windows, OS build: Windows 7 64 bit, Platform: PC

Comments (1)

  1. Log in to comment