After you have written tests for the `Polygon.envelope()` method, use a profiler to search for bottlenecks and try to optimize it.