-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge Armoria API with Armoria UI #6
Comments
@Blipz, what do you think about it? |
Always nice to reduce code duplication! If I understand correctly, renderers for UI and API would still be different, right? |
Yes, node.js cannot render as browser it doesn't have canvas API. So it will be basically the same |
I'd suggest replacing resvg-js by a package using a headless browser, like https://www.npmjs.com/package/convert-svg-to-png. A quick test shows that this would solve all the feature inconsistencies between UI and API. |
Sounds interesting. Did you try it? I have a concern on how fast it can be, it should be pretty fast as it's an API. |
Here are some metrics on my machine:
|
200ms is acceptable, I believe. Yes, it would be nice to use chromium engine to render SVG, it will allow us to remove the code difference between 2 renderers. |
It turns out the performance depends quite heavily on the size of the image (previous metrics were for 500x500), so I don't know how viable it will be in the end. |
500 is a good size. We can set a hard-coded limit to 1000px. If someone needs more, they will have to use SVG and render it manually at any size |
There is no real need in Armoria API being a separate project. The maintenance has a cost (both time and money), while a separate project doesn't provide any value.
We can create a single SvelkeKit project and move the API there as well as UI. Can deploy for free on Vercel
Issues:
Benefits:
The text was updated successfully, but these errors were encountered: