When importing OneNote notes that contain drawings (i.e. written with a pen), each pen stroke is stored as a separate SVG file. Therefore, each stroke generates two files: one MD file, and one SVG resource file. Consequently, importing even just a few written notes generates thousands of files, with hundreds of thousands being easily possible for ordinary notebooks. This in turn causes syncing that should only take minutes to take many hours.
I imagine mitigating this issue in two ways:
- Combine SVG data during import. E.g. all strokes can be combined into a single SVG file, or consecutive
elements (pointing to SVGs) can be combined into a single file.
- Combine resources during sync. Basically archive/compress all resources for a single note for storage on the sync target. Though I understand resources are not tied to notes and can be shared, so maybe resources can be arbitrarily grouped based on file size and number of files, and a map used to identify which resources is in which archive.
I would lean towards option 1, as this would also simplify the imported note. As it stands, such notes contain a huge number of elements, and are a waste of time editing. Converting to markdown loses scaling and positioning of elements, so notes are essentially completely destroyed upon markdown conversion. If strokes were grouped, the note would then become a HTML note with much fewer elements, and would be amenable to modification. In a way, this helps to solve both the issue of excessive sync times and un-editable imported notes.