{"action":"closed","issue":{"url":"https://api.github.com/repos/hyyan/woo-poly-integration/issues/343","repository_url":"https://api.github.com/repos/hyyan/woo-poly-integration","labels_url":"https://api.github.com/repos/hyyan/woo-poly-integration/issues/343/labels{/name}","comments_url":"https://api.github.com/repos/hyyan/woo-poly-integration/issues/343/comments","events_url":"https://api.github.com/repos/hyyan/woo-poly-integration/issues/343/events","html_url":"https://github.com/hyyan/woo-poly-integration/issues/343","id":335433568,"node_id":"MDU6SXNzdWUzMzU0MzM1Njg=","number":343,"title":"Extreme slowness after recent update","user":{"login":"repli2dev","id":475549,"node_id":"MDQ6VXNlcjQ3NTU0OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/475549?v=4","gravatar_id":"","url":"https://api.github.com/users/repli2dev","html_url":"https://github.com/repli2dev","followers_url":"https://api.github.com/users/repli2dev/followers","following_url":"https://api.github.com/users/repli2dev/following{/other_user}","gists_url":"https://api.github.com/users/repli2dev/gists{/gist_id}","starred_url":"https://api.github.com/users/repli2dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/repli2dev/subscriptions","organizations_url":"https://api.github.com/users/repli2dev/orgs","repos_url":"https://api.github.com/users/repli2dev/repos","events_url":"https://api.github.com/users/repli2dev/events{/privacy}","received_events_url":"https://api.github.com/users/repli2dev/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-06-25T14:32:35Z","updated_at":"2018-08-19T19:59:56Z","closed_at":"2018-08-19T19:59:56Z","author_association":"NONE","body":"\r\n#### Can you reproduce this issue on default Wordpress theme (eg Storefront)?\r\nNo (tested on new site with fresh woocommerce)\r\n\r\n#### Can you reproduce this issue when all other plugins are disabled except WooCommerce, Polylang and Hyyan WooCommerce Polylang Integration?\r\nProbably yes\r\n\r\n#### What product versions and settings are you using when this issue occurs?\r\n* PHP: 7.1.7\r\n* WordPress: 4.9.6\r\n* WooCommerce: 3.4.3\r\n* Polylang: 2.3.7\r\n* Hyyan WooCommerce Polylang Integration: 1.2.0\r\n* Browser: All\r\n\r\n\r\n#### Steps to Reproduce\r\nhave to many coupons in the database.\r\n\r\n#### What I Expected\r\nNo problems\r\n\r\n#### What Happened Instead\r\n\r\nSite is extreme slow (>= 10 sec) in network admin and main site containing the WooCommerce after around 2-4 weeks around. (Frontend works fine -- 2 sec)\r\n\r\nThe XDebug profilling showed that around 93 % of time was spent in `Hyyan\\WPI\\Coupon->adminRegisterCouponStrings` down to `registerCouponForTranslation` and probably to reading to database.\r\n\r\n#### Comment\r\n\r\nInstantiating 2900 coupons after the same amount of queries to the database one-by-one is just ineffective and also we don't need translated coupons strings.\r\n\r\nIs it a bug or feature?\r\n\r\n"}}
{"actor":{"display_login":"Jon007"}}