Is there a way to optimize the performance of an Add-On that makes a lot of sequential calls of the function APIDb_ChangeCurrentDatabaseID ?
In my case, this function is being used to switch to different layout databases. In the API documentation there are some examples that mention that switching to another database can be a very expensive operation, but it doesn't mention a way of optimizing it.