Comments (7)
@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.
Might be an idea: Load jobs of last 12/24h and use those in the timeline instead of all jobs?
from magento2-cronjobmanager.
@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.
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
I recorded another session without tooltips by commenting out this line of code, which renders the tooltip for each cron.
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.
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.
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
After
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.
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)
- Magento 2.4 support HOT 7
- Dashboard entries don't show any information HOT 1
- Assets
- Component\Filters class replaces the original one with missing values HOT 1
- Add "Job-Code" to Filter in Adminhtml HOT 1
- SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock. HOT 2
- Get the ID of the admin user that scheduled the currently running job? HOT 6
- Compatible with PHP 8.1 HOT 2
- PHP 8.1: Deprecated Functionality: Optional parameter $jobId declared before required parameter $jobCode
- PHP 8.1 | Deprecated Functionality: Function strftime() is deprecated... HOT 10
- Magento 2.4.5 - Status Column (html.js) not working HOT 4
- PHP 8.2 / Magento 2.4.6 support HOT 2
- "Required parameter 'theme_dir' was not passed" when I dispatch now a cronjob in backend HOT 3
- Add Total time column in the management grid HOT 3
- Add a feature to reporting "missing" job HOT 4
- Sort by group results in Zend_Db_Statement_Exception HOT 4
- 2.1.0 Not Compatible With Magento < 2.4.6 HOT 8
- Can't execute action Schedule Now Cron Job in Grid Mass Action HOT 2
- Support config_path for cron expressions HOT 2
- PHP 8.3 Support HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magento2-cronjobmanager.