× Other Plugins

site speed and cb plugin problem in registration

8 months 3 weeks ago 8 months 3 weeks ago by saman سامان.
saman سامان
Posts: 233
More
Topic Author
site speed and cb plugin problem in registration #1
hi.
i use CB and joomdle and moodle.
i define some custom CB field map to moodle custom field in the joomdle mapping menu.
enable CB hook plug_joomdlehookscommuntybuilder_v2.0.2 in the cb plugin manager.

now i want describe my problem:
1-only enable plg_joomdleprofile_joomdlecbprofile_v1.1.0 (i disable default joomdle core plugin User hooks - Joomdle)
result of test user registration in joomla use cb registration form -->
A ) user created in moodle and joomla but custom field is not sync and is empty in moodle
B ) speed of registration is almost 5 second and it is normally

2- enable plg_joomdleprofile_joomdlecbprofile_v1.1.0 AND joomdle core plugin User hooks - Joomdle
result of test user registration in joomla use cb registration form -->
A ) user created in moodle and joomla AND custom field is sync in moodle and CB
B ) speed of registration is almost 20 second and it is long. i use Xdebug to debug that and it show multi run "Curl call method" as cause of slow speed.

please check that.
thank you
8 months 2 weeks ago 8 months 2 weeks ago by saman سامان.
saman سامان
Posts: 233
More
Topic Author
site speed and cb plugin problem in registration #2
i disable all option in auth plugin in the moodle admin setting and it seems low speed problem is related to "user sync to joomla" and get long time. but very better from before do that.
now, after disable all that i can disable option, i have 2 problem:
1- long speed change to 9 second , means 12 sec after fill the register form , user need wait to complete registration.(if i turn on CB Autologin in CBAutoAction plugin it is take more time about 12 sec)

2- if some user edit his profile in moodle, profile in joomla not update.is it possible in some way we select that this request (event) for edit user send from joomdle or send from EditProfilePage in moodle?

3-what do you do in your demo? your demo is better registration speed. you use easy social. this problem related to CB structure?
8 months 1 week ago
saman سامان
Posts: 233
More
Topic Author
site speed and cb plugin problem in registration #3
friendly bump...
8 months 1 week ago
Antonio Durán
Posts: 6897
More
site speed and cb plugin problem in registration #4
Hi Saman. Sorry for the slow reply, I have been doing some testing but it takes some time.

Please do a couple of changes to see if that improves your situation. I've been checking traffic, and with them I see less curl calls.
File: moodle/auth/joomdle/auth.php

Function: create_joomdle_user_record
Remove line this line almost at the end:
\core\event\user_created::create_from_userid($newuser->id)->trigger();

Function: create_joomdle_user
Change:
                user_update_user($updateuser);
By:
                user_update_user($updateuser, false, false);

Please test and let us know how it goes.
8 months 1 week ago 8 months 1 week ago by saman سامان.
saman سامان
Posts: 233
More
Topic Author
site speed and cb plugin problem in registration #5
Hi Antonio
Thank you for your advise and i do what you say and check with Xdebug as Kyle say in this link k
before i do your code we have 6 time Curl run but after remove trigger and false, false... it is reduce to 4 time run Curl... but yet it is also get long time to register.
if we have 15 sec before use your solution after that have 13 sec .
your solution have a bit effect but not resolve problem.
the main long time problem in Curl step occur.
8 months 1 week ago
Antonio Durán
Posts: 6897
More
site speed and cb plugin problem in registration #6
I don't think we can improve it any more.
You get more calls because you are running auto-login, so aside from user sync, SSO is performed. If you don't want it to be so long, disable auto-login, and make users login by themselves.
Also, any option you have enabled in Joomdle in Joomla will have an impact on speed, like sync joomlla user groups, mailing lists, etc.
8 months 5 days ago
saman سامان
Posts: 233
More
Topic Author
site speed and cb plugin problem in registration #7
1-is there anyway to create user in the background process to prevent get this time to load next page?
2-is this problem occur for your test or it is only for me? i test on local and server with fresh of all but it is occur for me. is it only occur when use CB?
8 months 4 days ago
Antonio Durán
Posts: 6897
More
site speed and cb plugin problem in registration #8
1 - No

2- If you do many things at once it is normal that it is slower. That's why I suggested to disable auto login.

I just tried in localhost: did a registration with CB, but not autologin. Time used was almost 6 secons.
As you are also doing auto login, that requires more processing and more curl calls, it is normal that it takes more time.
8 months 4 days ago
saman سامان
Posts: 233
More
Topic Author
site speed and cb plugin problem in registration #9

Antonio Durán wrote:
I just tried in localhost: did a registration with CB, but not autologin. Time used was almost 6 secons.
As you are also doing auto login, that requires more processing and more curl calls, it is normal that it takes more time.

i disable autologin but i use additional field in cb and moodle and use joomdle mapping to sync that fields...can you test with CB additional field and moodle and use mapping and say your result?
8 months 3 days ago
Antonio Durán
Posts: 6897
More
site speed and cb plugin problem in registration #10
That's the same test I did: I also had mappend CB data to Moodle.