I have some data that needs to be displayed on each page view and can not be cashed. Workflow is like this:
- Page is loaded
- Ajax call is made to custom php script that gets information from db
- The script returns json object
The php script is standalone and it doesn't require Magento intilization. I could create Magento controller that would return json object, but this would be very consuming process, Magento spends 10-30Mb extra memory for each ajax call (means for each page load), with custom standalone script only 1Mb of memory is spent.
Is there any very lightweight way in Magento 2 to load model and display data by excluding some steps?