Available for beta testing: Much faster Google Docs integration
Update: This is now available for testing in all browsers.
In the latest Zotero Connector beta, available for Firefox, we've switched to a new method of integrating with Google Docs that should dramatically speed up Zotero operations in large Google Docs documents. This brings Google Docs performance in line with Zotero integration in Word for Windows.
If you're using Firefox, you can try it simply by installing the Zotero Connector beta from the above page and reloading Google Docs.
If you run into any problems, let us know in a new thread.
You can temporarily disable the new mode by disabling "Enable Google Docs Integration v2 (BETA)" from the Advanced pane of the Zotero Connector preferences or by switching back to the release version of the Zotero Connector.
In the latest Zotero Connector beta, available for Firefox, we've switched to a new method of integrating with Google Docs that should dramatically speed up Zotero operations in large Google Docs documents. This brings Google Docs performance in line with Zotero integration in Word for Windows.
If you're using Firefox, you can try it simply by installing the Zotero Connector beta from the above page and reloading Google Docs.
If you run into any problems, let us know in a new thread.
You can temporarily disable the new mode by disabling "Enable Google Docs Integration v2 (BETA)" from the Advanced pane of the Zotero Connector preferences or by switching back to the release version of the Zotero Connector.
The current extension (approximately) works as follows:
1. The Zotero Google Docs extension UI is managed by the Zotero Connector.
2. Citation processing and the citing UI is managed by the Zotero client.
3. Reading the document for citation processing and then editing its contents is done via our standalone script running on Apps Script.
This update changes the part 3 of the above. In 2019 Google introduced an alternative way to interface with Google Docs - the Google Docs API. Apps Script is JS code that you deploy to Google's Servers and that's where that code runs whenever you need to interface with any document. The Google Docs API allows you to retrieve the full contents of the document via a HTTP GET request as JSON object and modify its content via HTTP POST requests.
The main reason Apps Script is slow is that each time it runs, Google needs to initialize a server with our Apps Script code, then fetch the document and preprocess it so that it can be read with the Apps Script programming API even if we only need to do something very simple. Even when we did our best to limit the number of times we need to call the Apps Script code (which is about 3-5 times for a citation insert), for a large document (think 100+ pages) just spinning up the Apps Script instance on Google's servers takes 5s+. If we needed to update all citations in a large document (say for changing the citation style), we couldn't do it in a single Apps Script call as the script would timeout after 60s of running, so we had to batch those updates, increasing the Apps Script environment overhead even more.
With the Google Docs API this is much simplified. Document reading and processing code is folded directly into the Connector. We only need to retrieve the document content JSON object once, we then batch as many updates as we need and submit it as a single call to the Google Docs API (i'm simplifying a bit, sometimes we need to refetch the document or submit multiple update calls, but this is the gist). The API itself is also much more performant than Apps Script, adding to the speed benefit.
- It is indeed way faster and much more fun to use
- IIRC the old version prevented me from inserting citations while in suggest mode. I tried to insert a citation in suggest mode and it let me do this but then threw an "Error updating Document" (Report ID: 2132666965). I assume this still isn't possible to do, so should still be disabled (though it'd be great if it were possible -- as you probably know, many collaborative projects work in suggest/track changes a lot)
Just when we switched away from Google Docs due to it being too slow :(
We'd particularly appreciate testing with large documents containing many citations, where you should see much faster performance. If you encounter any errors, please start a new thread and include a Debug ID from the Zotero Connector for reproducing the problem.
Is it OK to try the beta connector while other collaborators are still on the release version, or should everyone use the same version of the connector? Just to be sure. - Thanks
For information, it's working very well so far - definitely faster than the previous version - and I have about 150 references. If it was faster, it would be perfect, but it looks like that's not possible.
Small thing, sometimes I can't see the Zotero menu anymore (even if I'm in Edit mode) and in these cases I have to close Firefox & Zotero and restart both (maybe in a specific order? not sure) and it always ends up working. This may not be specific to this latest update though.
In any case: Thank you!
You can still enable the new method from the preferences if you want the faster performance — just be aware that you might hit an error that will require switching back to the old method.
- right click the Zotero connector on your browser and click "preference" (I am using Chinese version so not sure if I translate that correctly);
- You'll see "Enable Google Docs Integration v2 (NEW)" under "Advanced" > "Google Docs Integration".