Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


bernhard last won the day on June 12

bernhard had the most liked content!

Community Reputation

3,653 Excellent


About bernhard

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Vienna, Austria
  • Interests

Recent Profile Visitors

12,998 profile views
  1. I just want to share my findings from today when I wanted to create one million pages quickly: First, via Tracy Console: ini_set('max_execution_time', 150); $last = $pages->findOne("parent=/data,include=all,sort=-id"); $last = (int)$last->title ?: 0; for($i=$last+1;$i<$last+1000;$i++) { // create page $p = new Page(); $p->template = 'basic-page'; $p->parent = '/data'; $p->title = $i; $p->save(); l("saved page $i"); $pages->uncacheAll(); gc_collect_cycles(); } d('done'); It started at 23 pages per second: And at the end of the 150 seconds it was already down at 4 pages per second: Testing without logging: Memory usage also increased proportionally. Finally running a PHP script from the command line that bootstrapped PW worked well: <?php namespace ProcessWire; $time_pre = microtime(true); include("../../../index.php"); // bootstrap ProcessWire $last = $pages->findOne("parent=/data,sort=-id"); $i = (int)(string)$last->title ?: 0; // multilang quickfix convert to string // foreach($pages->find('parent=/data') as $p) { // $p->delete(); // echo "deleted $p\n"; // } // return; $i++; $num = 0; while($i <= 1000000) { // create page $p = new Page(); $p->template = 'basic-page'; $p->parent = '/data'; $p->title = $i; $p->save(); $pages->uncacheAll(); gc_collect_cycles(); $num++; echo "done: $num ($i)\n"; $i++; } function convert($size) { $unit=array('b','kb','mb','gb','tb','pb'); return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i]; } $time_post = microtime(true); $t = $time_post - $time_pre; $m = memory_get_usage(); echo "created $num pages in " . round($t, 3) . "s, " . round($t/$num, 3) . "s per page, used " . convert($m) . " memory\n"; Benefits: quick runs in the background and does not lock the site direct feedback via echo without creating huge log files cancel via ctrl+c any time
  2. Well, that would not be a problem at all, but don't you think this would be a good opportunity to create an account there and simply click the "new issue" button on your own (https://github.com/processwire/processwire-issues/issues) to show that you are willing to help resolving this issue? Using GIT was one the the major steps forward in the last few years for myself, so I'm quite sure you won't regret. PS: I haven't followed this topic; I'm sorry that I can't provide any help.
  3. MS Office Fusion360 ... Besides that I was quite happy with Ubuntu on my Carbon X1, but I don't want to switch OS all the time and Office is just a must have for me
  4. Well, a real linux kernel inside windows... And proper copy&paste. And having one single config json sounds awesome. Hope that principle will find its way to VSCode, then it would finally be really easy to share your dev environment across multiple machines
  5. Interesting, thx for sharing!
  6. Because it brings a lot of tools out of the box and makes everything really simple: New project --> create a new folder and klick reload MySQL --> HeidiSQL on board Testing E-Mails --> Mailcatcher on board Share your current work with a client --> ngrok on board But yes, sometimes it would be great to have a "real" linux machine for development. I've never tried WSL, but I've tried devilbox and came back to laragon because of its simplicity.
  7. https://github.com/processwire/processwire/pulls There are still pull requests from 2016... Please @ryan could you take a look at the PR repository just like you did with the issues over the last weeks? There are many simple ones that really just need to be merged (like https://github.com/processwire/processwire/pull/143/commits/80aa0ac2e6383b32a4d0a932d5bec78a8fb5bf14 ). It's really frustrating if one tries to contribute and this contributions just seem to be ignored
  8. Hi @Himanshu Modi and welcome to the forum, there is a reason why ckeditor does usually NOT format everything as word does... The HTML code that is usually produced by copy-pasting from word is a nightmare. You'll have all kinds of styling attributes inside your code that has several disadvantages (SEO, different stylings across your site like size, font, colors etc).
  9. You mean the config of the chart? Like type of chart, data, colors etc? Of course it would not make sense to put all that into the module config. But it could make sense to have a fieldtype (or at least an inputfield) that can easily be added to a process module (or page edit screen) and that makes it easier and more streamlined to build those charts. In RockGrid (which also has lots of options) I use a PHP file to get the data (via RockFinder) and a JS file for the grid config. I've started building a Chart module earlier this year, but did not release it: https://github.com/BernhardBaumrock/FieldtypeRockCharts Maybe you want to have a look and grab some ideas?
  10. Same experience I got when I wanted to try it on mobile. I thought that was because it was too new when I tried first
  11. Looking great! Thx! Nice to see apex charts in action. Did you build it as a module (or have thought about that) or is it implemented manually?
  12. Same here, now I know why I didn't know about it I'm using version 3.1 because I had something not working on 4.0 - I guess you are on a newer version?
  13. Just had a glance. German umlauts seem to not work:
  14. So would caching be an (easy) option? At the moment this is how RockGrid works: It makes one query to get one row (so the query should have limit=0,1) so that it knows which columns to setup for the grid. Then the second request is to get all data (and this is also used for all subsequent requests when reloading the grid). This is not the best solution, but I have no plans to change that for RockGrid. I start working on RockTabulator today where it will load all the data at the first request and display it instantly
  • Create New...