diff --git a/notebooks/02-routing-speed-time.ipynb b/notebooks/02-routing-speed-time.ipynb index d2e98a6..1711f16 100644 --- a/notebooks/02-routing-speed-time.ipynb +++ b/notebooks/02-routing-speed-time.ipynb @@ -250,7 +250,7 @@ "source": [ "## 4. Multiprocessing\n", "\n", - "Calculating lots of shortest paths can be slow, but OSMnx has built-in shortest path solver parallelization and multiprocessing. With the `shortest_path` function, you can pass in a single origin-destination pair to solve the one shortest path, or you can pass in lists of origins and destinations to solve each shortest path between the pairs. If you're solving shortest paths for multiple origins/destinations, the `cpus` argument determines how many CPU cores to utilize for parallelized solving. Multiprocessing adds some overhead, so it's only faster if you're solving a lot of paths. It also has substantial RAM requirements (as it must copy the graph into each sub-process), so be carefuly with your RAM when setting the `cpus` argument." + "Calculating lots of shortest paths can be slow, but OSMnx has built-in shortest path solver parallelization and multiprocessing. With the `shortest_path` function, you can pass in a single origin-destination pair to solve the one shortest path, or you can pass in lists of origins and destinations to solve each shortest path between the pairs. If you're solving shortest paths for multiple origins/destinations, the `cpus` argument determines how many CPU cores to utilize for parallelized solving. Multiprocessing adds some overhead, so it's only faster if you're solving a lot of paths. It also has substantial RAM requirements (as it must copy the graph into each sub-process), so be careful with your RAM when setting the `cpus` argument." ] }, { @@ -274,7 +274,7 @@ "%%time\n", "# it takes 2.3 seconds to solve all the routes using all the cores on my computer\n", "# I have a 24-thread AMD 5900x: performance will depend on your specific CPU\n", - "routes = ox.shortest_path(G, origs, dests, weight=\"travel_time\", cpus=None)" + "routes = ox.shortest_path(G, origs, dests, weight=\"travel_time\", cpus=2)" ] }, {