If you want to PM me the code, I’d be happy to take a look. Ideally, the icons and javascript should be coming from sources that get cached in your browser so they shouldn’t need to download each time. My gut would suspect other parts of the Custom Tile lifecycle – in general, they take a tick longer to render since they render in a separate context (as noted above)… when waiting for the stio.ready()
callback, that adds a bit of delay too as it waits for the DOM to be completely loaded before it will get that callback.
There’s a feature request open for accessing variables from Custom Tiles - I’d suggest casting a vote on it.
There’s not currently a way to access the name of the dashboard since the Custom Tiles are sandboxed, but feel free to create a feature request. I suppose the ‘context’ of the tile could be passed down.
There’s a few different approaches. In the sample code, I used two approaches:
- You can initialize your local variables to whatever value you want… then if the setting isn’t reported from the
stio.ready()
callback, you could leave the default value to be used (eg. theisNullOrEmpty()
type checks I used). - It’s not officially documented, but you can add a ‘default’ property into a setting in the ‘Do not edit below’ section. The parsing of that section is only triggered when the setting keys change – it was primarily intended for importing… so you have to either add or remove a dummy setting, then tab out for the new values to be parsed (and then remove/readd it).