You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,033

Location: Denmark

Occupation: Photographer

  • Send private message

1

Wednesday, April 1st 2015, 10:20am

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.

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,033

Location: Denmark

Occupation: Photographer

  • Send private message

2

Wednesday, April 1st 2015, 12:47pm

Apparently this is something requested by many.

Here is one by Tuur from 2010
http://www.krpano.com/forum/wbb/index.ph…l+xml#post11354

And there are several others.

How come this is not something you can do. My idea was the same as Tuur using delayed call which is why I found his post.

jordi

Intermediate

Posts: 509

Location: Barcelona

Occupation: creating ideas & coding them

  • Send private message

3

Wednesday, April 1st 2015, 1:26pm

compress your xml and you can get 50% off ;)
everpano.com step beyond 360

4

Wednesday, April 1st 2015, 1:44pm

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:
http://krpano.com/docu/xml/#include

and here:
http://krpano.com/docu/xml/#include-notes

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,
Klaus

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,033

Location: Denmark

Occupation: Photographer

  • Send private message

5

Wednesday, April 1st 2015, 3:44pm

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.

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,033

Location: Denmark

Occupation: Photographer

  • Send private message

6

Wednesday, April 1st 2015, 3:51pm

Got an idea. Is it possible to make a simple zip file and include that.

I can see that it cuts it down to 1/3 i n size

I remember that Easypano used zip for parts of the tour.

jordi

Intermediate

Posts: 509

Location: Barcelona

Occupation: creating ideas & coding them

  • Send private message

7

Wednesday, April 1st 2015, 6:31pm

if you zip it, then you will need to unzip first and then parse, so you have an extra task...
everpano.com step beyond 360

Posts: 1,856

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

8

Friday, April 3rd 2015, 9:39pm

You could have the hotspots run a javascript function with an id and the hotspot name. Using the id, the javascript would get some data from the database or xml file and setup the popup.
That's one way to skin it.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,033

Location: Denmark

Occupation: Photographer

  • Send private message

9

Saturday, April 4th 2015, 11:34am

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.

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,033

Location: Denmark

Occupation: Photographer

  • Send private message

10

Saturday, April 4th 2015, 9:00pm

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.
http://360-foto.dk/nationalhistorisk-museum/start.html

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,033

Location: Denmark

Occupation: Photographer

  • Send private message

11

Saturday, April 4th 2015, 9:32pm

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" />

Posts: 1,856

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

12

Monday, April 6th 2015, 6:15pm

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.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour