mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-07 15:51:56 +00:00
Opening a .ai or a PDF read and checked the whole file up to five times: for the document it carries, for whether it holds the editor's private data, for the import, for the editor's copy and for its File Info. Each pass parses the file and walks every object, about 190 ms on a 15 MB .ai. - vectorcraft_pdf::open_pdf reads and checks the file once, on the import's deep-stack thread, and import_opened imports pages from that reading. document.open takes the carried document, the page count, the editor's copy and the File Info from it. The editor's copy is read after the page import and only when the file is not restored from a carried document; so is the File Info. - A .ai saved without PDF compatibility opened with pages that name every page reads its editor's copy from the same reading. - document.pdfInfo reads the file once for its pages and the thumbnail. - The Open and Place dialogs read the file once to decide whether to ask for pages, instead of twice. A file whose PDF part fails the check still reads its editing data separately, as before.