Why does it take so long to load a route in CycleBike?

It doesn't, really, but it seems we have less patience to watch a spinning circle on our smart phones than when we're at a desktop. The power of a smart phone is actually pretty remarkable, but the processor and memory are not as quick as your laptop.

Other navigation cycling computers also seem to spend a lot of time "Calculating...". You know which ones I mean.

So what is happening in CycleBike while the cursor is spinning?

A route file is actually just a text file with numbers representing Latitude and Longitude coordinates of the track you will be following. There may be other information like turn directions, street names or the location of coffee shops. This information is "tagged" in the file with xml tags. You can open the route file using any word processing program. (Smart phone apps may complain that they can't read the files, or open them very slowly.)

CycleBike reads this text file, extracts the information using the xml tags and generates a list of track points. Depending on which tool is used to create the route file (See the blog about Creating a Navigation Route) there may be thousands of track points in a several MByte file.

Next, CycleBike analyzes the list of track points and finds clusters that may indicate a turn or intersection in the route. It seems that most route generating applications sprinkle a lot of track points at these critical locations. These important locations are saved with the key "TPC" or "Track-Point-Cluster".

Then, the other track points are thinned. Sometimes, the track points can be very close together, which is unnecessary and just clutters the list of cue sheet directions. (The track point density can also be selected in the Settings Menu in the app).

Now, CycleBike looks for turn information in various text tags in the route file and decides which turn icon to present and what description to display for the turn. If no turn information is found, the turn direction is calculated using just the track points. An icon is selected to indicate the route continues straight, turns left or right or turns just slightly left or right.

There is a lot going on behind the scenes while that cursor is spinning (for a few seconds).