Body: <p>I have a custom text field where the user is allowed to link text with uploaded files via ckeditor (respectively kcfinder). Currently the upload of files does take a very long time. It's not a network issue because the actual request is sent after a few seconds. There seems to be an additional step afterwards, which delays the response for minutes (e.g. for a file with size of 4.7MB):</p>
  
  <p><a href="https://i.sstatic.net/OOn9m.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/OOn9m.png" alt="upload request details"></a></p>
  
  <p>If I upload the file via a standard upload input (non ckeditor) the request is finished in seconds.</p>
  
  <p>Here are some details about the request:</p>
  
  <p><a href="https://i.sstatic.net/jsd7G.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/jsd7G.jpg" alt="enter image description here"></a></p>
  
  <p><em>Using CiviCRM 4.7.23 with Drupal 7.56 on CentOS with Plesk, Apache and FastCGI.</em></p>
  
  <p>I do not have this issue on my local dev machine, only on this server.</p>
  
  <p>What could cause this delay? Are there any relevant CiviCRM or server settings?</p>
  
  <p><strong>UPDATE:</strong> After adding some error log calls including the current timestamp I could face down the function, which is causing the delay. It is <code>$img = image::factory($this-&gt;imageDriver, $file['tmp_name']);</code> where <code>$this-&gt;imageDriver</code> has the value <code>imagick</code>. It seems that the creation of the <em>imagick</em> object is taking way to long (the following image tasks are done quickly). Any idea what could cause this?</p>
  
  <p>After disabling <code>imagick</code> and using <code>gd</code> instead the upload is finished in seconds.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-15T17:26:03.673Z
Comments.Text: Whats the contents of the headers tab?
Comments.UserDisplayName: David Hayes
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-18T08:11:24.327Z
Comments.Text: @DavidHayes Check my updated question.
Comments.UserDisplayName: Philipp Michael
Tags: <ckeditor><upload><imagick>
Title: Upload of large files with ckeditor and imagick takes very long time
ThreadText: # Upload of large files with ckeditor and imagick takes very long time
  
  (Asked by: username_0 on 2017-12-06)
  
  I have a custom text field where the user is allowed to link text with uploaded files via ckeditor (respectively kcfinder). Currently the upload of files does take a very long time. It's not a network issue because the actual request is sent after a few seconds. There seems to be an additional step afterwards, which delays the response for minutes (e.g. for a file with size of 4.7MB):
  
  [![upload request details](https://i.sstatic.net/OOn9m.png)](https://i.sstatic.net/OOn9m.png)
  
  If I upload the file via a standard upload input (non ckeditor) the request is finished in seconds.
  
  Here are some details about the request:
  
  [![enter image description here](https://i.sstatic.net/jsd7G.jpg)](https://i.sstatic.net/jsd7G.jpg)
  
  *Using CiviCRM 4.7.23 with Drupal 7.56 on CentOS with Plesk, Apache and FastCGI.*
  
  I do not have this issue on my local dev machine, only on this server.
  
  What could cause this delay? Are there any relevant CiviCRM or server settings?
  
  **UPDATE:** After adding some error log calls including the current timestamp I could face down the function, which is causing the delay. It is `$img = image::factory($this->imageDriver, $file['tmp_name']);` where `$this->imageDriver` has the value `imagick`. It seems that the creation of the *imagick* object is taking way to long (the following image tasks are done quickly). Any idea what could cause this?
  
  After disabling `imagick` and using `gd` instead the upload is finished in seconds.
  
  **Tags:** ckeditor, upload, imagick
  
  > **Comments:**
  > **username_1**: Whats the contents of the headers tab?  
  > **username_0**: @username_1 Check my updated question.  
  
  ---
  
  ## 0 answers
  
  