I wonder if the nascent CSS Layout API enables a proper solution to this. A quick skim of the spec seems to indicate that it could run the author’s algorithm in a single layout pass and it does reveal the browser’s chosen line break points, but it doesn’t give word by word metrics. But, maybe you could use custom elements and JS-inserted children to get word by word metrics with performance still good since there’s still only one pass.