Closed yixuan closed 8 years ago
BTW in the future can you please include Fixes #58
in either the PR comment or one of the commit messages? That way when I merge the PR, the related issue is automatically closed.
Sure. Will keep in mind in the future. Thanks.
This PR should greatly improve the performance of svgstring() based on the discussion in #58.
The basic idea is to let
svgstring_
return a pointer of the string buffer, instead of copying the whole string to R every time. When user requests the SVG content, a reader function will be called on the pointer and the string will be retrieved.When device is closed, the final string will be copied to R, so users can still retrieve the SVG string even if device is closed.
Based on this PR, below is my result for the same test in #58.