New answers tagged performance
The add_rewrite_rule function doesn't change the database. Just an array in memory. It is not an expensive operation. The alternative is to add code to detect whether your rule is there, which is actually more expensive than just modifying the array.
You may want to check out WP Performance Profiler for this. It is similar to P3 Performance Profiler in that it detects the amount of resources required for a specific plugin on your Wordpress installation, however it goes more in-depth than P3. It is also a good tool if you are a plugin developer and wanting to run load tests on your plugin.
Top 50 recent answers are included