Some problems ask you to add to all nodes on a path. Use a lazy propagation segment tree to handle range updates efficiently. During the path walk, instead of querying each chain segment, you update it with a range update operation. This still takes segments times per update, giving total.
The segment tree must support both range updates and range queries with lazy propagation. Without lazy propagation, range updates would take time, defeating the purpose.
Space complexity is for the data structures used.