i do not claim to understand the code but org-export-get-environment is possibly calling org-id-find on entire buffer instead of subtree.
perhaps this explains why exporting a couple of lines without any org-id link takes 15s to a minute or so. it is always checking all of my files for org id even when i export to subtree. -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com Ramsay's disease DOES progress. MANY people have died from it. And ANYBODY can get it. Denmark: free Karina Hansen NOW.