Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ajaxQueue to work on hosting with few resources. #215

Merged
merged 4 commits into from Apr 6, 2017

Conversation

jorix
Copy link
Contributor

@jorix jorix commented Apr 2, 2017

To work on hosting with few resources (memory) it is recommended to
sequence ajax requests, this avoids simulating requests from a page.

WHY?: We and other cooperative using the same hosting we have seen constant error appeared when loading the Aixada pages. Consulted with the technical service showed the log where says that not can allocate memory, and they recommended that we use a business-pro plan. Avoiding concurrent simultaneous ajax requests the problem disappears completely!

This patch also proposes:

  • Unify common js declarations on php by aixada_js_src()
  • Break js old cache generating php/inc/header.inc.version.php by make_canned_responses.php ad used in aixada_js_src() and aixada_js_version()
  • Separate the common part of header.inc.php into header.inc.base.php

To work on hosting with few resources (memory) it is recommended to
sequence ajax requests, this avoids simulating requests from a page.

WHY?: We and other cooperative using the same hosting we have seen constant error appeared when loading the Aixada pages. Consulted with the technical service showed the log where says that not can allocate memory, and they recommended that we use a business-pro plan. Avoiding concurrent simultaneous ajax requests the problem disappears completely!
`DS` and `__ROOT__` mast be declared in both "header.inc.php" and "header.inc.base.php"

NOTE: Could use ` <?php echo str_replace('"js/','"../js/', aixada_js_src()); ?>` to declare js on php page in a sub-folder.
@jmueller17 jmueller17 merged commit a05f079 into jmueller17:master Apr 6, 2017
@jorix jorix deleted the a-ajaxQueue branch April 20, 2017 21:04
jorix added a commit to jorix/Aixada that referenced this pull request Apr 23, 2017
* manage_providers.php: On a provider has been noted that may not load drop-downs VAT and Imp.Rev.
* manage_orders.php: Changed preventively.

Related PR: jmueller17#215
jmueller17 added a commit that referenced this pull request Oct 1, 2017
Use ajaxQueue in two more requests (see #215)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants