« first day (3293 days earlier)      last day (1640 days later) » 

1:23 PM
Ben Popper on October 22, 2019

Welcome back to the another episode of the newly rebooted Stack Overflow podcast. This week we’ve got a very special guest, Cassidy Williams of React Training. Cassidy is a coder, mechanical keyboard enthusiast, and prolific Twitter comedian. She also curates our newsletter. On this episode, we talk about Paul’s career as a a club promoter, Ben’s brush with terrifying bitcoin spam, and Sara’s favorite Kanye tweet. Enjoy, subscribe, and leave us a rating if you like the show. …

 
 
3 hours later…
4:06 PM
How does wordpress name their resized images? Like this: image_name-min-widthxheight.format?
Eg: ferrari_car-min-1024x768.jpg
 
Right. For example, medium is a set size in the system 300x300 so an image would be image-name-300x300.jpg or whatever it can crop to. If an image is less or equal to a specific size it won't add on the 300x300
 
I see, thanks
 
4:40 PM
I just monitored resource usage of using WP CLI. Fetching a post without loading plugins or themes consumes ~80% cpu usage and ~1% memory. I have a decent computer (i7 8550U series 2GHZ and 8GB ram).
MySQL used ~17% cpu usage and same memory usage when running a query in the sql console. SQL doesnt do as much as WP CLI does of course. Is this normal resource usage of WP CLI?
 
4:56 PM
I don't think that's a sensible question to ask
especially without timings
e.g. I if just moved 80km and expended 2 litres of gasoline/petrol to do it, is that a lot?
would it be a lot if I told you I was being driven at 1.5kmph and it took 53 hours?
What if I told you it took 7 seconds? Would it still be a lot?
And if I told you my car was running inside a virtual world?
In which case how long did it take WP CLI to run the command? Was it ran on a server or your local machine or a virtual machine? Is your drive a spinning mechanical disc, or is it high end single cell NAND flash?
and what else was the computer doing at the time?
 
5:46 PM
Ben Popper on October 22, 2019

I’ve spent the better part of the last decade immersed in the world of technology. I could give a lengthy lecture on the history of LIDAR and the future of self-driving cars. I could explain what’s so fascinating about artificial intelligence that can beat humans in poker and why we shouldn’t be afraid of robot overlords just yet. I’ve got a cocktail party’s worth of witty things to say about the potential for brain-computer interfaces and our very cybernetic future. Despite all my years as a journalist covering technology, however, the closest I got to working on the code that makes all  …

 
6:11 PM
@TomJNowell Of course! I was on my local machine and and i have an SSD disk. How can i see the time it used?
 
 
2 hours later…
7:51 PM
@abobakrdy you can time it with commands such as time
❯ time brew update
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Formulae
........

real	0m13.365s
user	0m2.810s
sys	0m2.575s
 
8:16 PM
428ms, half a second
 
posted on October 22, 2019 by Francesca Marano

The second release candidate for WordPress 5.3 is now available! WordPress 5.3 is currently scheduled to be released on November 12 2019, but we need your help to get there—if you haven’t tried 5.3 yet, now is the time! There are two ways to test the WordPress 5.3 release candidate: Try the WordPress Beta Tester plugin (choose the “bleeding edge […]

 
8:35 PM
have you tried fetching multiple posts? it could be that most of that time is starting up WP itself
 
 
1 hour later…
9:54 PM
tested with 10 posts and it took 6 seconds
all though it completed in 1s or so, maybe its something i dont understand about how to measure-command in powershell works :P
 
ooh powershell, time as i was using it is a *nix command
are you interacting with a site hosted locally? Or remote? How are you hosting the site and running it?
 
Yeah but measure command is the windows equivalent of that so shouldnt be any major difference
Locally through xampp
 
and have you compared with a standard WP install with no plugins or themes? ( ignoring any parameters you might pass )
ah, XAMPP could be introducing a large number of variables to the mix
 
Nope! The database is somewhat large containing 5000 posts or so
 
and what is the command you're using to test this?
 
9:59 PM
Is it nessasary to deactive themes and plugins when i can use the wp cli parameters to do it?
 
It's extremely difficult if not impossible to talk about how something is impacted when you don't have a base line
e.g. if a fresh standard WP install runs near instantaneously
right now you're doing experiments to figure out performance
but you're not setting controls, and you have nothing to compare your figures against, so you have no idea if those values are good or bad
and your experiment is unreproducible, only you know what commands you ran, and in which context
 
I understand. The WP install is fresh but it does have a theme and 1 plugin installed and activated
 
for example, I have a WP install running the default theme with 4 posts running inside a virtual machine on my computer, if I run time wp post list on PHP 7.4, it takes 0.312s
the VM has 2 cpu cores and 2048MB of virtual RAM
 
Im running it locally (no VM) with a wp setup with 5000 posts total whereas 1000 are of type post and almost all of the rest are images. The wp install has 1 theme (genesis with child theme) and 1 plugin activated and installed. php version is 7.3 and cpu is 4 cores.

Total time: 1351ms
The script runs 4 wp cli commands in total:

`wp post list --field=ID --post_type=post --format=ids --posts_per_page=100 --skip-themes --skip-plugins
wp post meta get $post_id _thumbnail_id --skip-themes --skip-plugins;
wp post get $post_id --field=content --skip-themes --skip-plugins;
wp db query "SELECT ``ID`` FROM ``bl_f_posts`` WHERE ``guid`` = '$img_url'" --skip-column-names --skip-themes --skip-plugins
wp post meta add $post_id _thumbnail_id $image_id --skip-themes --skip-plugins`
 
ooh it's 1.3s total for all the commands together?
you can write a custom command to do stuff in a single command and speed things up that way
 
10:14 PM
And its performing varios operations in between (regexp and other basic stuff like conditional logic etc). I guess if you dont use Win 10 its quite hard to replicate it.
 
if you do a custom command you can do all of that in PHP
 
Yeah, but i already spent 1 hour trying to get this to work in powershell now lol
Yes for all together + all powershell code in between
 

« first day (3293 days earlier)      last day (1640 days later) »