Translate: Parsing code for ....

73 views
Skip to first unread message

Emiliano Heyns

unread,
Aug 1, 2022, 2:41:21 AM8/1/22
to zotero-dev
Where does the code live that parses the translators and which outputs "Translate: Parsing code for"? This is unnecessary work for BBT background exports and I want to see if I can avoid it be called in those cases.

Abe Jellinek

unread,
Aug 1, 2022, 11:35:44 AM8/1/22
to zoter...@googlegroups.com
https://github.com/zotero/translate/blob/1de1a0e56d2b7d7a93e75d3cbe426aa3ad4291d3/src/translation/translate.js#L1774

But it’s not like it’s being manually parsed - the translation architecture just calls a sandboxed eval() on the translator’s code.

On Aug 1, 2022, at 2:41 AM, Emiliano Heyns <emilian...@iris-advies.com> wrote:

Where does the code live that parses the translators and which outputs "Translate: Parsing code for"? This is unnecessary work for BBT background exports and I want to see if I can avoid it be called in those cases.

--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zotero-dev/8ef7bbd4-d689-48f0-9dea-805995f32c57n%40googlegroups.com.

Emiliano Heyns

unread,
Aug 1, 2022, 11:48:20 AM8/1/22
to zotero-dev


 

But it’s not like it’s being manually parsed - the translation architecture just calls a sandboxed eval() on the translator’s code.

Got that, but even though some recent fixes dramatically slimmed down the BBT translators, they're still very hefty, and the eval is entirely redundant for background exports.
 

Emiliano Heyns

unread,
Aug 1, 2022, 11:51:33 AM8/1/22
to zotero-dev
Hmm, looks tricky to reach into that. Maybe better not.
Reply all
Reply to author
Forward
0 new messages