Skip to:
Content

BuddyPress.org

Opened 8 years ago

Closed 8 years ago

#6847 closed enhancement (no action required)

xprofile_set_field_data is very slow

Reported by: danielhuesken's profile danielhuesken Owned by:
Milestone: Priority: normal
Severity: major Version: 2.4.0
Component: Extended Profile Keywords:
Cc:

Description

I have writtzen a sync that syncs 27 xprofile fileds of 3000 Users. If i must make a initial sync it kan take a day. If im not sync the xprofile files it take minutes.

As secound if you save a Extended Profile (Backend Page) you can feel the slow save too.

In Sync i use the xprofile_set_field_data() function. The xprofile_get_field_data() is fast.

Change History (7)

#1 @DJPaul
8 years ago

Writes are always going to be slower than reads. You might want to consider splitting your sync into small batches so that each sync runs individually quicker. The cause may be your server infrastructure, not just BuddyPress or WordPress.

Alternatively, if you know how to configure XDebug and get a profile log generated, I'm happy to take a look through that and identify where the most time is spent. It may reveal slow parts of BuddyPress we could optimise, as what you're doing sounds like it's an edge case we've not tried before.

#2 @danielhuesken
8 years ago

If i write directly to the BuddyPress Tables it is fast! But i will use the function so that i don't have problems on updates.

I will try to make the profile tomorrow

#3 @DJPaul
8 years ago

Thanks. The XDebug profile will probably be pretty large (in megabytes), so you'll want to zip that up and put it up on Dropbox, or similar.

#4 @danielhuesken
8 years ago

I have done the Profiling. I have aborted the task so the the will not gets to big. Here you can download it https://dhue.de/dl/xprofile_set_field_data.zip. It works as a wp-cli command in the Class AGD\Sync\Models\SyncMembershipModel and the method update_wp.

#5 @danielhuesken
8 years ago

I have replaced the uploaded file with a newer one. That uses only 25 User to sync and is not so big in size.

#6 @danielhuesken
8 years ago

I have found one bottelneck in our implementation of a buddypress field. I will try to fix it and look if it is than fast enoth.

#7 @danielhuesken
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Ok, i can only say sorry i have found the bug in our code. Now after fix it works in minutes too.

Note: See TracTickets for help on using tickets.