[ 
https://issues.apache.org/jira/browse/GUACAMOLE-884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16937968#comment-16937968
 ] 

Michael Jumper commented on GUACAMOLE-884:
------------------------------------------

{quote}
Chrome, firefox, Safari, IE, edge browsers all have this problem.
{quote}

No, this does not occur with Firefox. I have not tested against IE, but either 
way this remains a bug in the browser(s) in question, not within Guacamole. If 
the workaround you describe will work without performance penalty, it may still 
be worth doing, but we definitely shouldn't attempt to work around a browser 
bug if doing so will hurt performance across the board. More on this below.

{quote}
We found that as long as we use the new image () to draw the image, we have 
this problem.
{quote}

There does appear to have been old bugs in Chrome related to leaks in 
{{Image}}, though they have been marked as fixed:

https://bugs.chromium.org/p/chromium/issues/detail?id=36142
https://bugs.chromium.org/p/chromium/issues/detail?id=114570

A very similar bug in WebKit, also marked as fixed, was recently reopened:

https://bugs.webkit.org/show_bug.cgi?id=31253

{quote}
But if you turn the base64 picture into blob, it's no problem to use the method 
of createImageBitmap to produce image. But there is a big problem of browser 
compatibility in createImageBitmap. Is the way you transmit data wrong? Maybe 
there is a better choice for data transmission. Base64 pictures should not be 
used. Many people say that frequently drawn canvas does not recommend base64 
pictures, but rather RGBA matrix pictures.
{quote}

No, the way we transmit data is not wrong. Base64 is a perfectly valid 
mechanism for transmitting data, and in this case happens to be the best 
performing.

The choice of base64 was not made arbitrarily. Binary data transmission 
mechanisms have been tested, as have other alternative encodings which require 
manual decoding in JavaScript like a 7-bit encoding. In all cases, using base64 
and data URIs far outperformed other methods. Minor gains in bandwidth due due 
to using a more efficient encoding than base64 were eclipsed by performance 
penalties due to {{Blob}}.

I will do a quick performance check and retry decoding received Base64 without 
using {{Image}}, however I am expecting the same results as in past tests: 
poorer responsiveness.

> Canvas Render Browser Memory Leakage
> ------------------------------------
>
>                 Key: GUACAMOLE-884
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-884
>             Project: Guacamole
>          Issue Type: Bug
>          Components: guacamole-common-js
>    Affects Versions: 1.0.0
>         Environment: guacamole 1.0
>            Reporter: jianfeng chen
>            Priority: Minor
>         Attachments: 001.png, CorrectCode.png, guac-js-heap.png, pysh.py
>
>
> In SSH protocol, executing Python scripts will constantly render and refresh 
> the interface, resulting in a gradual increase in browser memory, and finally 
> browser crash.
> The script content is in the attachment.
> Execute script instructions:python pysh.py 1024 1



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to