Giter VIP home page Giter VIP logo

Comments (7)

Ethan3600 avatar Ethan3600 commented on July 26, 2024 1

@JeroenVanLeusden I created a new release (v1.6.1) that will speed up the timeline tremendously, and give it the ability to handle more records.

While I did not include the filter you suggested earlier, I felt like this latest performance boost in combination with this new feature, we should not face the issues you described in issue #50

I'm trying to avoid the filter as much as possible because I'd rather have as much information presented to the user as possible; but if it's still an issue, please open another issue or I'll reopen this one.

Closing this for now.

from magento2-cronjobmanager.

JeroenVanLeusden avatar JeroenVanLeusden commented on July 26, 2024

Might be an idea: Load jobs of last 12/24h and use those in the timeline instead of all jobs?

from magento2-cronjobmanager.

Ethan3600 avatar Ethan3600 commented on July 26, 2024

@JeroenVanLeusden good idea. I wouldn't be opposed to making that a setting, but I think the JS needs a little work too.

Ideally, we should be able to update the layout relatively quickly regardless of the amount of records we stuff into it. I want to dig deeper and figure out what is causing the "jankyness"

from magento2-cronjobmanager.

Ethan3600 avatar Ethan3600 commented on July 26, 2024

Did a little digging last night and found out something interesting:

I think one of the culprits to the jankyness is attributed to tooltip.js

In the below call tree, you can see we're spending 34% of the time within toolip.js's init() method defined here: https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings/tooltip.js#L723

image

I recorded another session without tooltips by commenting out this line of code, which renders the tooltip for each cron.

image

You can see that we're spending most of our time within the firefox "graphic" function, which I have no idea what that is but I imagine it's a low level "painting" mechanism or something. When I removed the tooltip.js functionality I noticed a substantial increase in performance.

A solution here would be to use a CSS tooltip rather than the JS tooltip. I think magento has a mixin that we can use for this, so that may solve that problem.


It's still a bit slow, even after removing the tooltip KO binding, so I'll need to do some more digging.

from magento2-cronjobmanager.

Ethan3600 avatar Ethan3600 commented on July 26, 2024

So... to my dismay, the CSS tooltip didn't help much. It somehow made it worse! I'm starting to think that KnockoutJs just can't handle iterating over large data sets, which would require us to really limit the amount of crons we can load in the timeline. Not ideal.

But... there is some sliver of hope:
http://output.jsbin.com/dakihezega/2

There's a plugin called "fastForEach" (which is luckily packaged with Magento's code base 🎆 ) If I could leverage this somehow with my custom foreachProp binding, maybe we won't have to filter the amount of crons!

from magento2-cronjobmanager.

Ethan3600 avatar Ethan3600 commented on July 26, 2024

Sorry for blowing up the thread (having too much fun here), but I was totally wrong.

The issue wasn't the tooltip... it was the render attribute, which is a wrapper for KO's template binding. Also, KO's template was overridden by Magento to "support asynchronous loading of templates"

This slowed things down tremendously. See before and after flame charts:

Before

image

After

image

Not sure if fastForEach helped much, but I'll keep it for now.

I'm going to begin stress testing to see how many records we can handle now.

from magento2-cronjobmanager.

Ethan3600 avatar Ethan3600 commented on July 26, 2024

So, we can comfortably load over 4k records with little to no jankyness. We can even push it to 6k with a little lag.

Moreover, I was able to load 16768 records without crashing my browser (albeit, really slowly). To test anything more than that isn't worth it because it's arguable that 16k is considered "unhealthy"

I'd say, this is a tiny victory, but there just doesn't seem like a way we can (comfortably) support any more than 6k records.

I wonder if we should put a warning if there's more than a certain amount of records in the database.

Question is: at what point is the amount of records in cron_schedule universally deemed "unhealthy?" I have my own opinions, but I don't want to "impose" that on users.

Very confused on what to do should do here...

from magento2-cronjobmanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.