>
> 1. is the cost of using canvas to resize image very large?
>

 You'd have to measure to know for sure. Let us know if it seems to be
unreasonably large.


> 2. is there any other way to resize image and return new data url
> other than using canvas?
>

Not that I know of, although others might.


> 3. when i use canvas=null, does it mean that the javascript engine
> will clean it? (i cannot see any GC related to that)
>

This or calling 'delete canvas' should be sufficient for the


> 4. is there any way to force the chrome js engine to do Garbage
> Collection?
>

In general, no, by design. For testing purposes there is a flag you can pass
on the command line to enable a javascript command "window.gc()" to force
garbage collection.

--js-flags '--expose_gc'

This may only work in Debug builds, I'm not sure. You could try running with
this and force a gc after deleting the canvas to see if it changed the
amount of memory used by the extension process.



> 5. in task manger of chrome. is the memory usage shown only caused by
> the extension alone, not sharing the memory with the pages/chrome?
>

I believe the memory shown in the task manager for an extension is just for
that extensions' own pages which are open (background page, options pages,
browser/page action popups, etc.). Note that tabs opened via javascript
window.open calls from an extension page may live in the extension process
instead of their own process.
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en.

Reply via email to