Currently, the landmarker makes many synchronous expensive trips to the server in order to display a textured mesh.
The following two synchronous steps happen when the landmarker loads to cache thumbnails for rapid browsing.
GET /images/assetid - just to find out the size of the image, and if there is one.
GET /thumbnail/assetid - load the thumbnail, now we know the size.
And then, once a new asset is loaded...
GET /meshes/assetid - load the actual mesh geometry
GET /textures/assetid - synchronously load the texture after the fact. Note that only a texture can be placed on a mesh, a thumbnail is just shown as an image placeholder.
Over a slowish-secure connection this number of round trips makes the experience of using the landmarker pretty sluggish.
As a solution to this problem, I've started work on a branch which instead makes the loading of assets totally asynchronous in the landmarker. In the new solution:
The call to GET /images/assetid is eliminated. We just get the image and inspect it to find it's size.
The calls to GET /meshes/assetid and GET /textures/assetid happen asynchronously. If the texture is absent the thumbnail is used as a texture to the mesh - once the texture loads the thumbnail is replaced.
This really improves the perception of the landmarker 'feeling' fast. The work is ongoing and unfortunately had to be left up in the air before I went on vacation, but is largely complete. I would like to revisit it shortly before it bit rots away.
Currently, the landmarker makes many synchronous expensive trips to the server in order to display a textured mesh.
The following two synchronous steps happen when the landmarker loads to cache thumbnails for rapid browsing.
GET /images/assetid
- just to find out the size of the image, and if there is one.GET /thumbnail/assetid
- load the thumbnail, now we know the size.And then, once a new asset is loaded...
GET /meshes/assetid
- load the actual mesh geometryGET /textures/assetid
- synchronously load the texture after the fact. Note that only a texture can be placed on a mesh, a thumbnail is just shown as an image placeholder.Over a slowish-secure connection this number of round trips makes the experience of using the landmarker pretty sluggish.
As a solution to this problem, I've started work on a branch which instead makes the loading of assets totally asynchronous in the landmarker. In the new solution:
GET /images/assetid
is eliminated. We just get the image and inspect it to find it's size.GET /meshes/assetid
andGET /textures/assetid
happen asynchronously. If the texture is absent the thumbnail is used as a texture to the mesh - once the texture loads the thumbnail is replaced.This really improves the perception of the landmarker 'feeling' fast. The work is ongoing and unfortunately had to be left up in the air before I went on vacation, but is largely complete. I would like to revisit it shortly before it bit rots away.