Vue 3 Better performance of lot of DOM elements - vue.js

I have a big fat sort of table with lots of elements that make it really buggy.
For context 1 row per user, each user has X projects and each project has 3 month of day display (sort of gantt)
So I built something cool it's working great, but if I scale to more users it begin to be real buggy.
I'm implementing filter to display less users but at some point it need to handle the limit that I have now without being buggy.
What I found is when I'm updating a day it re-render the whole Gantt which is really stupid.
here is a minimal reproduction link: https://stackblitz.com/edit/vitejs-vite-g6azah?file=src%2FApp.vue&terminal=dev
As you can see when I'm updating an input with the v-model:
value.value
I have the attribute with the function
:test="testRerender()"
That trigger for the whole Gantt and I believe it is the issue here.
I saw v-memo that look like what I need but I can't figure out with the doc how can I use it to match my needs (and there is almost no good article on it)
Thanks for your help you would save my life!
I tried to filled proper :key attribute, code optimization, v-memo etc...

Related

Grid component performance

Just thinking and a question round my mind. I use to code xaml using grid, easier for me, at least. Just define the grid and using its cells (span row and column and so on...).
Doing a web´s demo today I remember table´s tag is being obsolote and I am wondering, the same idea could be applied to grid in mobile´s app.
Thinking about it, absolute and relative layout are similar to div (web speaking) so we could deduce the right way to render the xaml should be using those kind of layouts...
What do you think guys? What advantages and deficiencies are coming on using those approaches? I want to get use to code thinking in the best way, not thinking about easyness of that (supposing, that benefit me in long terms. Maintainability, flexibility,...).
As usual, thanks for your help mates.
Well, the point is the next one. As web design do, using layout (relative and absolute) like div could be more complex at the beggining, but after the project is growing up, the benefits of using these approaches take relevance with the time.
If you need to change the style of the view, these layout are more flexible for doing it, just set the limits of the each element and you can add another element as well in a easy way.
But if you decided to use grid layout approach, and after, you need to change the style, the operation will be more complicated because you probably need to reset the definition of column and row for adding new elements and this implicate to recode every row and column for the other rows as well.
Hoping it helps when you are in design phase and you need to calculate risk and maintainability of your app.
Cheers mates...

Custom Function Filter ordering on YADCF

First of all, thank you so much for your support of YADCF. It's a fantastic tool! Second, I'm not a programmer (I know enough to break stuff :D) so I apologize in advance for having to bother you at all. It's possible my question has even already been answered, I just don't know what to search for.
I'm using the YADCF 0.8.8 table on DOM Source (small "d"). I've built a custom_func_filter based on 11 values & labels. The weird thing is, when the drop-down menu displays for the filter, the labels are not in the order they're defined in.
In trying to figure out what the issue was, I changed the values and labels to numbers from 01 - 11 instead of text to see how it was moving things around. Apparently it's anything over 10 items that it begins to jumble everything up. Here's a side-by-side comparison on what it looks like:
custom_func_filter comparison
I'm behind a firewall so it's not easy to share my code, but I'll figure out a way to if need be. I just wasn't sure if there was something I was missing.
Using datatables 1.9.4, jquery 1.11.3.
Thank you!
You are welcome :)
Quick answer: Use the sort_as: "none" and make sure the data array is in your desired order
Explanation: BEcause in custom function filtering the select is being populated by (data) array of objects value/label the sort as (as its implemented now) wont really sort the data, so since you populate data manually, just make sure its in your desired order

Big Commerce, Top\Featured\New Products on category page

Hi there working with bigcommerce Im looking to get the following style of break down on each category page
Essentially making a category version of;
%%Panel.HomeFeaturedProducts%%
%%Panel.SideTopSellers%%
%%Panel.HomeNewProducts%%
Ive gone ahead and attempted this however they seem to be pulling in from global values, and there dose not seem to me much option to break these down or limit the category, has anyone done this previously and if so how?
developerscott is correct in those panels not offering contextually unique data. I'd recommend looking into Unbxd. It has a 30 day trial so you can either investigate their programmatic solution or use it in place of making your own.

JSF best strategy to populate datatable

I'm fairly new to JSF, and to coding itself. I'm working with JSF for 9 months now, and I noticed two ways of populating data tables:
-when pagination link is clicked, then new query is executed with given first and last record to show from results
-when user loads page query is executed and records are store in bean, so when pagination link is clicked, there is no query only giving records from stored result list (primefaces)
And here is my question :
Witch way is better?
I assume that second way need more memory, but it's used by primefaces, so I'm not sure that this is 'the right way'
First way need less memory - it gets only records needed to show, but isn't it to slow?
PS - BalusC - I hope you will take part in this discussion, since I see your answers very helpful, and explanatory:)
Personally when it comes to populating and managing a datatable. I feel the lazy-loading is the best practice. This is not a JSF specific way of loading the data, however; a few component libraries make it easy to implement (Primefaces, Icefaces, etc...).
Lazy-loading will help maintain large amounts of data, making sure the your page doesn't hang up and will keep a smooth user experience.
Primefaces LazyDataModel
Icefaces datatable(Already implemented)
Rich-faces Lazy Loading

Edit a small SQL rowset using forms in Django

I'm interested in displaying 1-5 model instances using forms on a page using a grid similar to something one would find in a desktop database application. I understand I would need to use multiple forms or formsets but an additional requirement is that I'd prefer it to be in more of a grid format with each model's fields being display in columns with common field labels on the y-axis.
I should have the ability to edit multiple columns (so in effect, model instances) at the same time and then commit either the single column (model instance) or commit all. I'd also like to be able to highlight the changed cells that have changed to give visual feedback to the user that there are pending changes.
Sorry for the rather long list of requirements and I'm aware this probably requires a few different technologies/techniques to achieve. I'm throwing this out there because I'm asking this kind community for guidance on what components/technologies I should look at. If luck would have it, there would be some jQuery component that can handle this for me almost out of the box. If not, some guidance on achieving the editing of multiple model instances would be of help.
I will also need to build in versioning in case the data displayed on the view page is stale and to prevent overwriting a newer commit. I'd probably achieve the latter using a versioning field in the table that will perform the check and handle it accordingly.
Also, Flask and Django are both options for the engine and WTForms look to be promising at least at first look.
Thanks
There is no such ready to use solution in Django. Just create your custom form that handles as many instances as you want and do anything that you want, or extend formset.