1. For a first module of a network controller that generates a set of output configuration data for at least one managed forwarding element, a method comprising: for a logical router, receiving a set of input configuration data comprising a first set of routes for the logical router; offloading a route traversal process to a separate second module of the network controller by providing the first set of routes to the second module, wherein the route traversal process returns a second set of routes based on the first set of routes; and generating the set of output configuration data for configuring the at least one managed forwarding element to implement the logical router based on the second set of routes.