I want to propose an extension of the current Calibre Plugin to not only optimize the epub itself, but also generate the cache files with it. This would take close to no time on a regular PC, while combined may take quite a while on the XTEINK Device, hence just pregenerating it may take one of the last truly "slow" parts from the current embedded systems.
The Crosspoint For CrumBLE already does this when using the Webinterface for upload, but I think any kind of uploader would be enhanced by providing that option.
To be more precise, Crumble creates the Cache by using a WASM inside of javascript to create the bin-files on the fly (https://github.com/imshentastic/CrumBLE/blob/main/src/network/html/js/optimizer.js#L2244, the WASM is created with https://github.com/imshentastic/CrumBLE/blob/main/tools/crumble-prebake/build-wasm.sh). Of course, we cannot run some javascript and WASM in calibre (or maybe we can, but it may not be the optimal option here), but maybe something similar should obviously be possible, especially as the bin format of those cache files is well documented. The main challenge is likely doing so in a way that minimizes maintenance, best case reusing the crosspoint main repo instead of reintroducing the logic in here (at least if the complexity is above a certain threshold).
I can do some python and would be willing to help, but my knowledge of embedded systems is rather limited, so I would need some guidance on that.
I want to propose an extension of the current Calibre Plugin to not only optimize the epub itself, but also generate the cache files with it. This would take close to no time on a regular PC, while combined may take quite a while on the XTEINK Device, hence just pregenerating it may take one of the last truly "slow" parts from the current embedded systems.
The Crosspoint For CrumBLE already does this when using the Webinterface for upload, but I think any kind of uploader would be enhanced by providing that option.
To be more precise, Crumble creates the Cache by using a WASM inside of javascript to create the bin-files on the fly (https://github.com/imshentastic/CrumBLE/blob/main/src/network/html/js/optimizer.js#L2244, the WASM is created with https://github.com/imshentastic/CrumBLE/blob/main/tools/crumble-prebake/build-wasm.sh). Of course, we cannot run some javascript and WASM in calibre (or maybe we can, but it may not be the optimal option here), but maybe something similar should obviously be possible, especially as the bin format of those cache files is well documented. The main challenge is likely doing so in a way that minimizes maintenance, best case reusing the crosspoint main repo instead of reintroducing the logic in here (at least if the complexity is above a certain threshold).
I can do some python and would be willing to help, but my knowledge of embedded systems is rather limited, so I would need some guidance on that.