You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. My app uses a number of svg images, some of them in several places. All of
them are use an asset.
What is the expected output? What do you see instead?
The app takes a performance hit. SVG images load slowly.
What version of the product are you using? On what operating system?
Version 1.2 (hg clone).
Please provide any additional information below.
My suggestion is that an "asset" attribute is defined to go along with the
standard "svg" attribute. "asset" should be set to override "svg". When
specified the SVGImageView should bypass the Resource and InternalURI logic and
load the image straight from the asset. Gains a little speed and makes the use
of the View in the layout more logical.
As far as caching is concerned, I have implemented a solution using a "cache"
(boolean) attribute and an internal HashMap which caches the Drawable with the
"svg" or "asset" attribute value as the key.
The first time a particular asset (resource or URI) is used with "cache" set to
true the drawable is created and stored in the HashMap. The next time an
SVGImageView accesses the same "asset" (again with "cache" set to true) we
simply pull the stored drawable.
This introduces a significant speed boost. Find the modified SVGImageView.java
file attached.
Original issue reported on code.google.com by a...@spoton.com on 6 Nov 2013 at 5:30
Original issue reported on code.google.com by
a...@spoton.com
on 6 Nov 2013 at 5:30Attachments:
The text was updated successfully, but these errors were encountered: