Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Lag within a custom "sidebar" - Harlowe

I used Greyelf's CSS code from this thread to display icons for my inventory items in a "sidebar", but with every new passage I go to, the icon (about 30px by 30px) always starts near center, and takes a second or two to get to its final location. Basically, it lags. I'm using Harlowe 2.0.10, and Base64 image decoding to display the images. Is the lag because I'm using Base64? Or could it be something else? Again, the file sizes themselves are very, very tiny. I've also hidden the original sidebar in my stylesheet.

Thanks in advance!

Comments

  • If you have not changed Harlowe's default layout to use fixed sizes instead of percentages then I believe the lag is due to the fact that the header needs to be rendered before the percentages can be calculated.

    eg. by default the story area takes up the middle 60% of the total view-port width, and the left side-bar (which is actually part of the passage) is positioned based on that calculation. It takes time to calculate the width of the story, to load the image, to calculate the position of the side-bar (the left: -7em;), and to move the header.

    If you changed the default CSS to use fix widths for the story/margins/etc.. then the lag should be greatly reduced.
  • Thanks! I tried using fixed widths and it didn't actually resolve anything. But! I did solve it by removing the center-alignment I had in my stylesheet. There is no lag anymore. Thanks!
Sign In or Register to comment.