Ships on certain trade routes may spend an excessive amount of time at a dock doing nothing. For example, a cargo ship may in the worst case be docked for 5 minutes at a port unloading and loading exactly zero goods.
This happens when a trade route unloads and loads the same type of goods at a stop. For a cargo ship, the worst case happens when unloading and loading all slots of the same type of goods. For example, unload 300 wood, then load 300 wood, which takes 5 minutes. The calculation sums the unload time and load time separately, even if nothing is unloaded or loaded, which does not make sense.
Trade routes such as these are often used by players in combination with minimum stock limit when production/consumption rate of a good is often changing(due to trade, docklands, etc.), so it would be very disappointing if this bug is ignored simply because such trade routes are used more rarely than regular ones.