One of the hidden outcomes of Amethyst Outbox is the preloading of everything a post needs to render, including all quoted posts, url previews, videos, images, profiles per page (200 posts) instead of per post as it happens today.

This means that all inline elements that are rendered inside a post will be pre-sized such that when the post loads on scrolling, the UI already knows the size of each thing in the text and can avoid many layout changes while loading. This is particularly visible today when loading quoted notes from links (when the app doesn't know what it is yet) to inline quotes. Same for videos and images in posts that don't support the iMeta tags (like from Primal) that should have had the size information built in.

This will be extremely important to get our Shorts feed loading faster and potentially allowing the use of continuous scroll in that part of the app as well, a feature that is only possible if you control a central server to provide sizes for the videos before downloading them. We are going to do that without relying on any server and without overflowing the phone with unnecessary data or unnecessary memory use.

Reply to this note

Please Login to reply.

Discussion

# Melhoria de performance no Amethyst

Para quem não entender e não tiver tradução para português, o Vitor Pamplona disse que o Amethyst passará por um aumento de performance. Segundo ele:

"Um dos resultados ocultos do Amethyst Outbox é o pré-carregamento de tudo o que uma publicação precisa para ser renderizada, incluindo todas as publicações citadas, pré-visualizações de URL, vídeos, imagens e perfis por página (200 publicações), em vez de por publicação, como acontece hoje.

Isso significa que todos os elementos em linha renderizados dentro de uma publicação serão pré-dimensionados de forma que, quando a publicação for carregada ao rolar a tela, a interface do usuário já saiba o tamanho de cada elemento no texto e possa evitar muitas alterações de layout durante o carregamento. Isso é particularmente visível hoje ao carregar notas citadas de links (quando o aplicativo ainda não sabe o que são) para citações em linha. O mesmo vale para vídeos e imagens em publicações que não suportam as tags iMeta (como as do Primal), que deveriam ter as informações de tamanho incorporadas.

Isso será extremamente importante para acelerar o carregamento do feed do Shorts e, potencialmente, permitir o uso de rolagem contínua nessa parte do aplicativo também, um recurso que só é possível se você controlar um servidor central para fornecer os tamanhos dos vídeos antes de baixá-los. Faremos isso sem depender de nenhum servidor e sem sobrecarregar o telefone com dados desnecessários ou uso desnecessário de memória".

nostr:nevent1qqsy5qad4z8207zhnkw5ug0l8svd36zkny5s9pgdt5dlljzndwzusrcpzdmhxue69uhhwmm59e6hg7r09ehkuef0qgsyvrp9u6p0mfur9dfdru3d853tx9mdjuhkphxuxgfwmryja7zsvhqrqsqqqqqpr75dyx

When?

Lots of bugs yet :(

Interesting. nostr:npub1syjmjy0dp62dhccq3g97fr87tngvpvzey08llyt6ul58m2zqpzps9wf6wl maybe something like this on Jumble is possible?

I'm not sure how Amethyst handles it, but I think if it waits to fetch the embedded note before rendering the note, it’s definitely going to be slower than just rendering the note first and then loading the embedded note afterward.