mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-11 23:00:58 +00:00
aa24a9eff7
With "Show whole trip" on, every leg of every day went to the router one at a time, a second apart, and the route cache lived in memory only, so each visit started over: a trip of a month took 30 to 45 seconds before its route was drawn, on every open. Routes the router answered are now also kept on the device (Dexie v14, routeCache by RouteCalculator's cache key, a month at most, the oldest give way past 3000). A leg found there needs no request and no pause, so a trip whose legs did not change opens with its roads at once; only new or changed legs are routed. Plugin routes stay in memory only, since they depend on trip and day. The cache moves out of RouteCalculator into routeStore.ts. Closes #2794