Open Chris2011 opened 2 years ago
I will work on it. Thank you.
Hi i made some performance improvements
https://github.com/moacirrf/netbeans-markdown/releases/tag/0.0.5_alfa
What you think about?
Thanks
https://user-images.githubusercontent.com/950706/193418138-314a063c-b5d8-4d9c-9ebe-62f03992ba72.mp4
Maybe is interesting download all images first an make a local cache, what you think?
Hey, unfortunately your download link is not working, i shows a 404. Just make an relase or alpha release or so or draft to let the others know that it is still in progress or so.
What is exact the performance issue? Rendering the images?
Sorry, i made other release, now is public, https://github.com/moacirrf/netbeans-markdown/releases/tag/0.0.5_alfa
What is exact the performance issue? Rendering the images?
- Svg images needs to be converted to png, now they are converted only one time, and they are reused.
- Content of MD file is loaded with a SwingWorker
- Included a progress bar on preview window
Thx, I tested it and here are some infos:
Can you just tell me what flexmark is doing here? What kind of output is it? I can still select the output stuff. Is the output somehow SVG or some other formatted output? I just wanted to know the performance problems here, not the performance enhancements.
Btw, thank you very much for your great work.
Sorry to hear that the enhancements don't resolve your issues.
Can you just tell me what flexmark is doing here? What kind of output is it? I can still select the output stuff. Is the output somehow SVG or some other formatted output?
Flexmark parses the MD format and generate html.
I use JEditorPane with a custom HtmlEditorKit to show this html on preview window.
JEditorPane has some problems:
Another possible problem, can be network problems, remote images must be downloaded first, so a slow server or a server with some kind of restriction can avoid or slowdown download images.
Thanks
Sorry to hear that the enhancements don't resolve your issues.
Thx, but I think it is better as before. Not complete optimal but a bit better.
Thank you very much for the insights :). Here is my readme and it is not about having images at all: https://github.com/Chris2011/nixos-docker-image-builder/blob/master/README.md
So in general the performance stuff is not only about images. Maybe we need more research. I guess, that flexmark is fast enough to do the generation (?). So maybe it is the HTMLEditorKit which seems slowish? Just guessing. But I know that there are some old stuff which was never touched again for years. So maybe there is still an alternative for the HtmlEditorKit and/or what about to just display an html file with HTML4j? Maybe this could be an alternative.
- Another possible problem, can be network problems, remote images must be downloaded first, so a slow server or a server with some kind of restriction can avoid or slowdown download images.
This is just the point if we have URLs which points to remote images but most of the time, the bigger ones like screenshots are in a local folder. In my case.
When I open a markdown file for the first time, which is not that big ~240 lines, first it takes couple of seconds to open it and it blocks the whole IDE. After first opening and open it again, I think it is cached somehow and it opens faster.
So this is just a problem for the first opening which doesn't take to long in other IDEs.
So here are my proposals:
IMHO the first 2 points are a must have, the others are nice to haves.