Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've been meaning to ask on Stack Overflow. It's simulating a video stream from a device with no FPU that's probably too slow to encode WebM or H.264. I'm dynamically generating a PNG image on the device and reloading it at regular sub-second intervals in Chrome via JavaScript. [Edit: I had to write a custom Ruby extension that directly calls libpng to get reasonable performance]

I have a hidden <img> tag and a <div>. In the timer callback I set the src= attribute of the <img> tag to the URI of the image plus the current time (e.g. "/image.png?v=123456789"), then in the <img> tag's onLoad I set the <div> tag's background-image style to the same value.

I was going to try using two <img> tags, and alternately hiding/showing them, but I doubt that will solve the caching issue. My current workaround is to keep the Chrome developer panel closed (which seems to store every resource loaded by a page regardless of any cache directives from the server) and have the page reload itself after 60 seconds of no user activity. Unfortunately, Chrome's memory usage still grows, only not quite as fast.



I, and many others, have been anxiously awaiting a fix for this:

http://code.google.com/p/chromium/issues/detail?id=36142

It keeps getting punted. If you care, I recommend starring the issue.


I starred it, but it doesn't look like anybody working on Chromium cares to fix it, and nobody's posted a reasonable workaround. So much for HTML5.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: