Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#28788 closed defect (bug) (fixed)

wpviews: whenever a view is updated or inserted, all the views are refreshed

Reported by: iseulde's profile iseulde Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.9
Component: TinyMCE Keywords: has-patch
Focuses: javascript Cc:

Description

This is pretty bad for views that take a long time to load. It's not necessary at all to refresh *all* the views.

Attachments (2)

28788.patch (2.5 KB) - added by iseulde 9 years ago.
28788.2.patch (3.6 KB) - added by iseulde 9 years ago.

Download all attachments as: .zip

Change History (10)

This ticket was mentioned in IRC in #wordpress-dev by DrewAPicture. View the logs.


9 years ago

#2 @DrewAPicture
9 years ago

  • Keywords reporter-feedback added

Hi Janneke, is this still an issue? Do we need a patch here?

#3 @iseulde
9 years ago

  • Keywords reporter-feedback removed

Yes, I'll try to make a patch asap.

#4 @DrewAPicture
9 years ago

  • Keywords reporter-feedback added

Are you still planning to work up a patch for this Janneke?

#5 @iseulde
9 years ago

  • Keywords reporter-feedback removed

Looking into this right now.

@iseulde
9 years ago

#6 @iseulde
9 years ago

  • Keywords has-patch added; needs-patch removed

So the current problem: whenever you insert a view, paste a view or edit a view, every single view re-renders. For paste it's even worse. Whenever you paste *anything*, every single view re-renders. If it's just a gallery, it's not that annoying, but it there are iframes to load, it's very visible and annoying.

With the patch the render function check whether or not all the viewnodes for a particular instance have been rendered before. One unrendered view for that instance (which means that there are more of the same shortcodes in the editor) triggers rendering for all the viewnodes in that instance, but not all the viewnodes.

I also updated the refreshView function so that only the viewnodes for that instance are refreshed.

@iseulde
9 years ago

#7 @iseulde
9 years ago

.2: Not necessary to force rendering for a view refresh.

#8 @wonderboymusic
9 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 29530:

wpviews: whenever a view is updated or inserted, don't refresh ALL of the views.

Props avryl.
Fixes #28788.

Note: See TracTickets for help on using tickets.