javascript - Bitmap Constructor URL VS image, how to decide? -


i wondering performance in such scenario there 100 bitmap element on stage.

if constructed bitmaps using url, each bitmap tries download image file url regardless fact use same image url?

and, if use image construct bitmaps, have download image once, so, bitmaps use same image? so, when use url?

i appreciate if clarifies difference between 2 approaches in-term of memory , bandwidth utilization, when use each one?

the url requested once, no matter how create bitmap same url, won't make difference perspective.

however difference is, if use url instanciate bitmap first time, (very likely) have wait until image loaded, , update stage display it.

update: i've made quick jsfiddle: http://bit.ly/10xavkf if take @ network-tab can see image requested once.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -