6.0.0-beta1
7/5/25

[#9405] 100% cpu for apache when exporting vcard 3.0
Summary 100% cpu for apache when exporting vcard 3.0
Queue Turba
Queue Version Git master
Type Bug
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester d-fens (at) 00010111 (dot) de
Created 11/24/2010 (5337 days ago)
Due
Updated 09/29/2011 (5028 days ago)
Assigned 11/25/2010 (5336 days ago)
Resolved 06/29/2011 (5120 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
09/29/2011 09:17:32 PM Jan Schneider Comment #10 Reply to this comment
This was actually a duplicate of bug #8627.
06/29/2011 07:30:32 PM Michael Rubinsky Taken from Horde DevelopersHorde Developers
Taken from Michael Slusarz
State ⇒ Resolved
 
06/29/2011 05:24:08 PM Git Commit Comment #9 Reply to this comment
Changes have been made in Git for this ticket:

Use chunk_split() for wrapping attributes if we know that it's already 
base64 encoded. (Bug #9405).

  2 files changed, 7 insertions(+), 3 deletions(-)
http://git.horde.org/horde-git/-/commit/d90a36975cb9417554c78d991b170f795ac21712
06/03/2011 10:11:01 AM Jan Schneider Comment #8 Reply to this comment
Is there a limitation (filesize) of the images from Horde / SyncML?

Images up to 200x200px are working. Images with more than 400x400px 
won't be synced.
Your phone limits the (file) size that it's going to accept.
06/03/2011 07:14:56 AM shop2007 (at) public (dot) linkpool (dot) de Comment #7 Reply to this comment
My solution would be
share/php/Horde/Icalendar.php
function _exportvData
Forgotten: About line 1092
06/03/2011 07:12:29 AM shop2007 (at) public (dot) linkpool (dot) de Comment #6 Reply to this comment
My solution would be

share/php/Horde/Icalendar.php
function _exportvData

OLD:
------
if (!$this->oldFormat) {
         $attr_string = Horde_String::wordwrap($attr_string, 75, 
$this->_newline . ' ', true, true);
  }

New:
------
if (!$this->oldFormat) {
     if ($name === "PHOTO"){
         $attr_string  = chunk_split ($attr_string, 75, $this->_newline);
     }else{
         $attr_string = Horde_String::wordwrap($attr_string, 75, 
$this->_newline . ' ', true, true);
     }
}

This works for me!

Question:
Is there a limitation (filesize) of the images from Horde / SyncML?

Images up to 200x200px are working. Images with more than 400x400px 
won't be synced.

06/02/2011 09:43:14 PM shop2007 (at) public (dot) linkpool (dot) de Comment #5 Reply to this comment
Can confirm that. Same probem here. Even one single photo in turba 
with 200x200 pixel takes more than half an hour on an amd 64 dual core 
cpu.
11/25/2010 03:42:29 AM Michael Slusarz Comment #4
State ⇒ Assigned
Assigned to Horde DevelopersHorde Developers
Assigned to Michael Slusarz
Assigned to Jan Schneider
Priority ⇒ 2. Medium
Reply to this comment
I see this.  And it is because Horde_String::wordwrap() is 
**brutally** slow.  We are talking (on a Dual Core 2) like 100 
characters/second slow.
11/24/2010 10:23:48 PM d-fens (at) 00010111 (dot) de Comment #3 Reply to this comment
ok digged a bit into it and found out a PHOTO attribute causes this hang in

framework/Icalendar/lib/Horde/Icalendar.php
protected function _exportvData($base = 'VCALENDAR')

just add a image to a contact and you will see
11/24/2010 04:59:42 PM Michael Slusarz Comment #2
Priority ⇒ 1. Low
Reply to this comment
Works fine here.
11/24/2010 11:18:55 AM d-fens (at) 00010111 (dot) de Comment #1
Patch ⇒ No
State ⇒ Unconfirmed
Milestone ⇒
Queue ⇒ Turba
Summary ⇒ 100% cpu for apache when exporting vcard 3.0
Type ⇒ Bug
Priority ⇒ 3. High
Reply to this comment
hi,

everytime i tried to export contacts as vcard v3.0 apache looped at 99%

Saved Queries