1. 22 Feb, 2016 4 commits
    • Etienne CHAMPETIER's avatar
      ZP-797 WBXMLDecoder->getTermStr(): use stream_get_line(). · 9f950cb1
      Etienne CHAMPETIER authored
      Released under the Affero GNU General Public License (AGPL) version 3.
      
      while importing 1340 contacts on an android 4.4,
      getTermStr was called 12021 times (and getByte 216005 times)
      This simplify greatly the code and improve performance
      9f950cb1
    • Etienne CHAMPETIER's avatar
      ZP-797 WBXMLEncoder remove possible endless loop/improve multipart handling. · 6e5d3e83
      Etienne CHAMPETIER authored
      Released under the Affero GNU General Public License (AGPL) version 3.
      
      (if $bp isn't a ressource, !feof($bp) === true ...)
      check $bp with is_ressource()
      fclose $bp
      use stream_copy_to_stream (more efficient)
      6e5d3e83
    • Etienne CHAMPETIER's avatar
      ZP-797 WBXMLEncoder remove _outlog / use output buffering. · 5accbeef
      Etienne CHAMPETIER authored
      Released under the Affero GNU General Public License (AGPL) version 3.
      
      we already buffer 1M of output, so we don't need _outlog,
      which is an always on debug code
      5accbeef
    • Etienne CHAMPETIER's avatar
      ZP-797 WBXMLDecoder remove inlog / reread php://input. · 40f4b10c
      Etienne CHAMPETIER authored
      Released under the Affero GNU General Public License (AGPL) version 3.
      
      With POST request, we can read multiple times php://input,
      this permit us to drop "inlog", which is an "always on" debug code
      (introduced in ZP-608 / bbfe372c)
      see Notes in http://php.net/manual/en/wrappers.php.php#wrappers.php.input
      see also http://stackoverflow.com/a/3402343
      
      we keep readRemainingData() as it's used in printwbxml.php
      
      here is my test:
      
      <?php
      
      // tested working version:
      
      // 5.6.15/fpm-fcgi (fedora22/php-fpm)
      // 5.6.5/fpm-fcgi (centos6 php56 scl/php-fpm)
      // 5.5.21/fpm-fcgi (centos6 php55 scl/php-fpm)
      // 5.3.29/fpm-fcgi (centos6 php53 ius/php-fpm)
      
      // 5.4.45-0+deb7u2/apache2handler
      // 5.3.28/apache2handler (rhel6 php53 ius/apache)
      
      if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
              echo 'not a post request!';
              echo '<br>'.PHP_EOL;
              echo 'curl --data "test POST" http://<server>/test-multi-read-input.php';
              echo PHP_EOL;
              exit();
      }
      
      function readinput($close = true) {
              $input = fopen('php://input', 'r');
              $content = stream_get_contents($input);
              if ($close)
                      fclose($input);
              return $content;
      }
      
      echo "Reading multiple time php://input ";
      if (readinput() === readinput() && readinput(false) === readinput(false)) {
              echo "WORKS \o/";
      } else {
              echo "DOESN'T WORK :(";
      }
      echo PHP_EOL;
      echo 'Version: '.PHP_VERSION.'/'.PHP_SAPI;
      echo PHP_EOL;
      echo PHP_EOL;
      
      echo "Input was: ".readinput();
      echo PHP_EOL;
      40f4b10c
  2. 18 Feb, 2016 17 commits
  3. 12 Feb, 2016 3 commits
  4. 11 Feb, 2016 3 commits
    • Sebastian Kummer's avatar
      Merge pull request #148 in ZP/z-push from feature/ZP-832-detect-folder-changes-faster to develop · 7cdb51e4
      Sebastian Kummer authored
      * commit 'bc067ce2':
        ZP-832 Run SyncCollections->CheckForChanges() stat comparing only on first run, improved comment.
        ZP-832 Add check if stats table can be loaded for shared users - log to INFO if that does not work, sync folders where no stat can be found only once a hour, include PR_CONTENT_COUNT, PR_CONTENT_UNREAD and PR_DELETED_MSG_COUNT into stat to reflect all kind of changes, SyncCollection->CheckForChanges() compares folderstats for changes when initiating, in case of error remove the folderstat to ensure folder is synchronized next Sync request, remove 'savestate' functionality as it is not used.
        ZP-832 Request folder statistics from the backend and setup the exporter only if the stat indicate that the folder contains changes. Per default the statistics are disabled (backend has to enable them). If disabled, an exporter will be setup for each folder.
        ZP-832 Log GlobalWindow size override only once.
      7cdb51e4
    • Sebastian Kummer's avatar
      ZP-832 Run SyncCollections->CheckForChanges() stat comparing only on · bc067ce2
      Sebastian Kummer authored
      first run, improved comment.
      
      Released under the Affero GNU General Public License (AGPL) version 3.
      bc067ce2
    • Sebastian Kummer's avatar
      ZP-832 Add check if stats table can be loaded for shared users - log to · 37293fc8
      Sebastian Kummer authored
      INFO if that does not work, sync folders where no stat can be found only
      once a hour, include PR_CONTENT_COUNT, PR_CONTENT_UNREAD and
      PR_DELETED_MSG_COUNT into stat to reflect all kind of changes,
      SyncCollection->CheckForChanges() compares folderstats for changes when
      initiating, in case of error remove the folderstat to ensure folder is
      synchronized next Sync request, remove 'savestate' functionality as it
      is not used.
      
      Released under the Affero GNU General Public License (AGPL) version 3.
      37293fc8
  5. 10 Feb, 2016 5 commits
  6. 09 Feb, 2016 8 commits