doc-get-definition-by-id is prepared for jump to definition in the other file, when we give xxx.rkt to doc-get-definition-by-id which means we cannot find a definition in the current file, instead, we find it's located at xxx.rkt so we need to jump to there.
In doc-get-definition-by-id we create an isolated syntax check (super expensive operation), consider the followings scenario this is a waste
- We had open
xxx.rkt and never modify it, then lookup Doc-trace of xxx.rkt can complete this task without a new syntax check
- If we never open
xxx.rkt, but then because we will open xxx.rkt, we will do syntax check again rather than reuse the valid syntax check we just did
doc-get-definition-by-idis prepared for jump to definition in the other file, when we givexxx.rkttodoc-get-definition-by-idwhich means we cannot find a definition in the current file, instead, we find it's located atxxx.rktso we need to jump to there.In
doc-get-definition-by-idwe create an isolated syntax check (super expensive operation), consider the followings scenario this is a wastexxx.rktand never modify it, then lookupDoc-traceofxxx.rktcan complete this task without a new syntax checkxxx.rkt, but then because we will openxxx.rkt, we will do syntax check again rather than reuse the valid syntax check we just did