Included xml in scenes loads at start

  • I have a museum tour which is around 80 panos.

    It will include a lot of text data for textfield popups. And totally it will be huge.

    I thought by making them on separate xml files and include them within each scene I could avoid loading them all at start.

    I seem to be wrong . They all load at start which on mobile take a very long time.

    I tried to do this. and use the keep false flag but it still loads. I seen the question before but there was no answer.
    <include url="textdk/text28.xml" devices="all" keep="false" />

    There are also images in the text data but they do not load until the scene is loaded.

    I have to solve this before I continue with coding all the text popups.

  • Hi,

    sorry but this is as the xml system is currently working - before the xml parser can start to parse the xml data into working data structures all <include> elements need to be resolved first.

    See also here:

    and here:

    To increase the loading performance try to inline all includes and to compress (encrypt) the xml files. On large xml files the compression ratio can be also way above 50%.

    Best regards,

  • Sorry encryping is not an option.

    The text data has to be easy accessible by client for editing.

    Klaus when you say it is how it is working, do you mean that it is how krpano does it or is it a general problem with xml data.
    I just wonder as it has been several requests on how to do this.

    I guess I have to divide it into 3 parts with 3 tour.xml files.

    I do need to do some tests on this as it is also something that needs to be made to an iBook.

  • Thanks Sacha

    I have discovered that the slow loading maybe is not at all depending on the system only but more which
    browser you use. While the standard Android browser takes up to 45 sec Firefox loads in 10-15 sec.

    There are some other peculiar things I do not understand. As I always believed that the include xml within the scene is loaded only when you open each scene
    the data has the same name in all textfiles.

    I have currently 50 text.xml files named text25.xml, text26.xml etc.
    Each of this has up to 27 data names and they are all named the same <data name="text1"> <data name="text2"> etc.
    If I do not include the textfile in the scene my infospots will open the last opened with that name

    This works fine as long as the text files are linked from each scene but it does not make sence as all xml is loaded so there are actually 50 text data with the same name.
    In theory it should not even work at all, as I am not allowed to have the same name on more than one. The xml should give me an error.

  • To increase the loading performance try to inline all includes and to compress (encrypt) the xml files. On large xml files the compression ratio can be also way above 50%.

    Klaus, what do you mean by "inline"
    I need to have all text divided into a textfile for each pano. It will be impossible to handle it in one file,
    There will be from my current calculation 1200 to 1500 hotspots.

    Apparently I need to have them included in each scenes unless I rename them all with new names for each scene.

    By the way I did a test with encryption. It does not make any difference at all.
    The folder with the textfile went from 440 to 209 kb but the standard browser still takes 32 sec to read before it shows panos.
    Firefox does it in just 12 sec
    My iPad 3 with IOS 6 takes also 12 sec. I will update to see if that helps.

    My solution is to make a frontend currently. I has an onloaded loadpano event so that it starts opening the tour behind the startpage.

    I just would like the loading text to be visible on the frontpage as clicking START gives you a delayed reaction.

  • Loadingtext fixed.
    Just needed a zorder and changing html="loading..." visible="false to html="loading..." visible="true"

    <layer name="skin_loadingtext" zorder="215" keep="true" url="%SWFPATH%/plugins/textfield.swf" align="center" x="5" y="-30" html="loading..." visible="true" autoheight="true" background="false" border="false" enabled="false" css="text-align:center; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:22px; font-style:italic;" textshadow="2" />

  • That does take a long time. Yeah, your whole xml architecture probably needs to be changed optimized.
    I would only include one text file and keep it organized and put it outside of the scenes. That will reduce your web server overhead and loading times.
    You can shoot me a pm if you want me to take a look.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!