Using Registry::get('addons... Slows Down The Process

I use a code part in may addon in Place order function:


<br />
if ( $order_info['payment_id'] == Registry::get('addons.cce_order_status.paymethod') ) {<br />
	   $pp_response['order_status'] = 'E';<br />
	  }<br />

```<br />
<br />
When I use this (Registry::get('addons.cce_order_status.paymethod') )), I think it slows down orderin process. It extend time of the process . Should I not use this? What is the correct way to get variable from addon settings?

you use it correctly and it should work fast enough (definitely less than 0.1 second) so if your ordering process is slow please try to check in other parts



best regards,

WSA team

Hi Damir. I tested my addon with this code and without. You are right. “Using Registry::get('addons…” code does not slow processes. I found that mailing process slows down ordering processes. When I remove “Send email to customer” thick in order status, ordering process is completing in seconds. But otherwise, mailing process takes 40-50 seconds. What may cause this problem? Is it normal?

[quote name='ooaykac' timestamp='1429598412' post='212153'] Hi Damir. I tested my addon with this code and without. You are right. “Using Registry::get('addons…” code does not slow processes. I found that mailing process slows down ordering processes. When I remove “Send email to customer” thick in order status, ordering process is completing in seconds. But otherwise, mailing process takes 40-50 seconds. What may cause this problem? Is it normal? [/quote]



Hello,



We can help you to investigate this issue, just contact us.



Sincerely yours,

CS-Market.

[quote]But otherwise, mailing process takes 40-50 seconds. What may cause this problem? Is it normal? [/quote]



please check this configuration page

in your store emails can be send via PHP or by SMTP server and in case of slowness you should always ask server admin about reasons



best regards,

WSA team