Perf-related revert "Fix: Speed up tokens API (refs #1212)"

This reverts commit 137b4ddcf1592ee5518defb6cc44207c22c51f7d.