locked
WebView Uri Stream Resolver - Possible Memory Management Error. RRS feed

  • Question

  • Hi,

    I am posting about a problem we are facing with the WebView Element, possibly with its internal memory management on a Windows 8.1 preview Store app (WinRT - C#/XAML).

    To be more specific:

    I want to load a local html 5 html page, with some related JS scripts, CSS files, Fonts audio files etc, from the local folder of my app (Storage Folder).

    In order to achieve that, I created the necessary class that implements the IUriToStreamResolver interface, in order to invoke from here all the wanted resources via the NavigateToLocalStreamUri method.

    The loading is always successful but as it seems there is major bug with the size of the allocated internal buffers (whatever cashing structure is used anyway), for the previously streamed resources.

    In particular:

    First of all, we found that there is a limitation as far it concerns the size of the parsed JS script. If I assign the VS 2013 RC project debugger target to “script”, you can see clearly in the attached screenshots that the parser is limited to about ~ 1200 lines of code.

    But the problem seems to be more general: Even if I “minify” that script, and the file loading is now feasible, we continue to face some major memory allocation problems.

    Still the WebView engine is not able to load correctly the local resources of my folder, while the size of them is just some KBs.

    (See the attached screenshots for more details.)

    As long as both JS scripts, CSS files, Fonts, images etc are all WebView –related “resources”, I think that the problem is located on the size of those internal cashing structures.  May I am wrong about that, but the problem exists anyway.

    My scenario involves Windows 8.1 Pro RTM and Visual Studio 2013 RC Ultimate, while the IE11 preview desktop app does not face any kind of problems, with the same resources.

    Thanks in advance,

    Alex.

    Tuesday, October 15, 2013 11:15 AM

All replies