Feasability of eager loading static data, table labels, and site content using DataTables and storage

Hello,

I’m an Android developer who is very new to meteor or modern SPA web development. I’m building a mental health diagnostic and treatment tool. We do online assessments for a variety of mental disorders. I’m concerned about the performance on both the initial loading and on the loading of the assessments outcome page. That page has graphs, tables, accordian sections and a lot of content. The actual user data is very small, just a list of their assessment score; like 35 for depression, 60 for anxiety etc. However there is a lot of text explaning the disorder, the symptoms, the treatments, the medication etc. For a user with many disorders I’m anticipating problems on that page. The entire site needs to be translated into Canadian French, so I plan to make use of internationalizion (or localization) tables. I found this library called DataTables.js. Here is a link to the content.

https://www.datatables.net/

One idea I had was to preload the content during the assessment section. The assessment is broken up into a series of short questionarres. We can score each disorder immediately after the user finishes answering the questions for that disorder. My hope is to use a service or a worker to eager load the corresponding text, table labels during the assessment process; right after we know the score. The assessment questions themselves are very light, with very little data and not much displayed onscreen.

Is this strategy a good idea? What libraries or coding strategies will help me implement the eager loading?

Thank you for any advice or feedback.
David

Hey. Foremost, premature optimization is the root of all evil. So right now I would suggest to just focus on building a good layout that is clean, easy to use and visually pleasing. And focus less on preloading and other associated sorcery. There might be a lot of information in the answers part, but from your description it seems that most of it is pretty static and thus a lot less prone to performance issues. I think the advice given by @coagmano in the other thread is still valid here as well.

I would suggest not using datatables. That’s a lot of complexity that will benefit users in only very specific circumstances (i.e. you’re probably not looking to display a table with a million rows here). And I think it’s a jQuery plugin - it’s better to leave that technology to the previous decade.

3 Likes

Ok thank you, that makes sense to me. I’ll do a follow up post if it’s needed in the future.

David