xlog-Note-32022-14

Token ID: 3

ERC-721 1 Transfers

Metadata

{
  "title": "xLog Weekly Summary #6 - Week 46, 2022",
  "tags": [
    "post",
    "Weekly"
  ],
  "summary": "This week we focused on performance optimisation and did not make any feature updates. So it may look a little boring.",
  "sources": [
    "xlog"
  ],
  "external_urls": [
    "http://xlog.localhost:3000/week46-2022"
  ],
  "date_published": "2022-11-21T12:54:23.403Z",
  "content": "<div style=\"display: none\">\n  \n![image](ipfs://bafybeibtr4cec6vi54ev2xqbw4ft7bibv3wuan3ixnrmmslbs72gw6aa5q)\n\n</div>\n\nThis week we focused on performance optimisation and did not make any feature updates. So it may look a little boring.\n\nPageSpeed Insights scores show this week's work.\n\nBefore this week\n\n![Snipaste_2022-11-17_20-24-27](ipfs://bafkreidat634c2sb4kdgwnrnjvfckxrhkhnf3u7r5g2bd4uxvkvayd33jq)\n\nAfter this week\n\n![image](ipfs://bafybeibtr4cec6vi54ev2xqbw4ft7bibv3wuan3ixnrmmslbs72gw6aa5q)\n\nAlso, you can clearly feel the speed change when you open a page.\n\nHere are some of the specific optimisations we've made this week.\n\n## Reducing the size of post list data\n\nxLog previously used the Crossbell Indexer directly to get the list of posts, which resulted in some additional unnecessary data. We now use xLog's own API, removing the unnecessary data and using the Redis cache.\n\nWe've also added paging so that the home page will only load the first 10 posts by default until the user clicks the load more button.\n\n![image](ipfs://bafkreiadktuvvptn3aevhky56icv2obihdqyb77ygmgbkheqveah4rmfju)\n\n## Lazy loading of Markdown parsing module\n\nWe found that the Markdown parsing module is huge, so we lazy loaded it. We also removed the dependency of the home page on this module and parsed Markdown through the server slide instead. This reduced the size of js on the home page by a lot.\n\n## More elaborate caching\n\nWe have been using Redis caching on the server side for all requests to mitigate the impact of the slow indexer.\n\nHowever, some requests are still time-consuming, such as finding the post id by post slug, so we optimized the caching logic for these needs.\n\nYou can check out our code changes on GitHub for a more detailed look.\n\nJust like always, if you have any suggestions or expectations, or just want to have a casual conversation, feel free to join our community or leave a comment below. Cheers! 🍻\n\n- [Join xLog's Discord channel](https://discord.gg/9XscSqJEq4)\n- [Follow xLog's xLog](https://xlog.xlog.app/)\n- [View xLog's source code or participate in its development](https://github.com/Crossbell-Box/xlog)\n- [Follow xLog's Twitter](https://twitter.com/_xLog)\n",
  "attributes": [
    {
      "value": "week46-2022",
      "trait_type": "xlog_slug"
    }
  ]
}