getRoomEventIndex: improved speed for what it is used