/mob/living/carbon/human/proc/dostuff()
involves doing lookup(/mob) -> lookup(/living) -> lookup(/carbon) -> lookup(human) -> lookup(proc) -> lookup(dostuff)
(as a simplified version, the compiler likely has shortcuts for keywords like proc.)
The issue is it has to repeat these lookups for every proc in a file, something that is rather unoptimal and likely represents a significant part of compile time.
The idea I had was to have it store the last lookup operation and check it first before doing another.
As a even better version, you could store the entire resolved path as a list, and then check that, so you can reuse common nodes. (say if the next proc is a /mob/living/carbon/proc, it could reuse the /mob/living/carbon parts from the cache)