I'm using editablefields to make a 'priority' field editable in a 'tasklist' view.
However, currently this is as good as useless in real life, because after selecting a priority, it takes about 15 seconds for the edit to process. What could be the reasons that this takes so long?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Renee S’s picture

The reason is because the editablefield loads the whole dang view each time you edit a field. I've got a line on an almost-working patch for this, and it will be posted on Monday!

catmurray’s picture

Has there been any progress on this? Much appreciated!

Renee S’s picture

Ah, yes! The attached patch was contributed by @rickyoh.

Renee S’s picture

It replaces the editablefields markup with inline forms. The initial view rendering is no faster*, but the AJAX part is substantially improved.

* This can be improved if you allow form caching to be routed to memcache or disk. There's some concern that a cache-full flush could lose form information if somebody is mid-edit, but using long-lived caches and disk with lots of space I haven't found this to ever be an issue. It would definitely be a problem if you were caching to APC or something more ephemeral.

Renee S’s picture

Component: Documentation » Code
Status: Active » Needs review
Renee S’s picture

Category: Support request » Task
StoraH’s picture

Thanks! This will hopefully fix a major issue we have with a lot of editors changing content at the same time. I just update paths in the patch.

joelpittet’s picture

Status: Needs review » Needs work

Quick review

  1. +++ b/editablefields.module
    @@ -248,7 +248,7 @@ function editablefields_field_formatter_view($entity_type, $entity, $field, $ins
    -    $views_field->views_form_callback = 'editablefields_views_form';
    +    //$views_field->views_form_callback = 'editablefields_views_form';
    

    Probably should remove the line if this is not needed anymore?

  2. +++ b/editablefields.module
    @@ -368,7 +370,7 @@ function editablefields_form($form, &$form_state, $entity_type, $entity, $field,
    -    $form['actions']['submit'] = array(
    +    $form['actions']['ef_submit'] = array(
    

    I'm really unsure why this needed to be changed?