Closed chengang151 closed 3 years ago
不支持.zip不支持某些 SVG,像这样。
E/libc++abi: terminating with uncaught exception of type mikroxml::malformed_xml: Unknown numeric character reference encountered: x30EC line: 4
The problem was in one of the dependent libraries, the mikroxml. The fix is available in mikroxml version 0.1.27. Please update your libraries and try again.
Thank you for your reply, which solves my problem. Thank you very much.However, I compared it to some similar libraries and found that the parsing was slow,Such as lunasvg,"https://github.com/sammycage/lunasvg".
do you mean reading svg file or rendering it is slower than lunasvg
?
Yes,Reading SVG is a bit slow, tested SVG, and some larger ones require 5s.For now, the compatibility is ok, and I will encounter some new SVG in the test.
Can you share the SVG files you use d for testing, so I could test as well? How long does it take to read those large SVGs using lunasvg
?
render_test_test.zip To facilitate the comparison, I uploaded this VS project.SVG is in the sample.3.072.svg.There are also android projects, which are faster on Android.
log.txt.Time comparison on Android.Lunasvg, of course, has its bugs.
svgren-master-cg.zip,This is the lunasvg project,Android 8.0 needs a signature to read the path properly.
Hess 8.0 Android, reads about 5s more, the other one about 1s more.Render 1s more,lunasvg render 200ms.
could you re-upload the render_test_test.zip
file again? For some reason zip cannot unpack it... saying that fle format is not supported. The other zip file unpacked successfully.
msvs_solution_vs.zip Vs project.
msvs_solution_vs_new.zip use this.
Thanks, I could download an unpack the zip file now. I'll take a look at why is it slow.
possible performance improvement would be to avoid using istringstream
, see https://github.com/cppfw/svgdom/issues/24
I've implemented a number of optimizations to svgdom
version 0.3.66
. Now loading should be like 6x faster.
nonsupport.zip Some SVG is not supported,like this.