[BUG]: Long loading of the compiler page behind a proxy server that restricts access to some Internet resources #1206

Open
opened 2025-02-15 09:51:29 +00:00 by Phalaphun · 1 comment

What Happened?

I have a problem with the compiler. The page takes a very long time to load. This is found on both 5.0.3 and 5.1.0-rc4. It took 1400 seconds to load the compiler page, after clicking the compile button the page loaded in 2527 seconds. The compilation itself, according to the information from the page, took 4 seconds.
The bottleneck is afterRenderComponent com_componentbuilder (2.65MB) (2527.31s)

Joomla is installed on local machine via WSL (apache2 + mysql). On my machine access to the Internet is through a proxy server. A proxy server may restrict access to some IPs and domains.

Steps to reproduce the Bug

Simply click on the Compiler button in the ‘Components - ✓ Component Builder’ menu

Which Joomla version are you compiling in?

Joomla! 5.2.3 Stable [ Uthabiti ] 7-January-2025 16:00 GMT

Which PHP version are you compiling in?

8.3.6

Which Joomla versions are you targeting?

5.2.3

Which PHP version are you targeting?

5.2.3

Which Web server is JCB running on?

Apache 2.4

Which Relational Database is JCB running on?

Mysql 8.0

Which OS is JCB running on?

Ubuntu 24.04 via WSL

Which JCB version are you using?

5.1.0-rc4

Where in JCB did this issue occur?

Installation of a component, Compiler(admin_view)

On which browsers did you encounter the issue?

Firefox, Microsoft Edge

Additional Comments

No response

### What Happened? I have a problem with the compiler. The page takes a very long time to load. This is found on both 5.0.3 and 5.1.0-rc4. It took 1400 seconds to load the compiler page, after clicking the compile button the page loaded in 2527 seconds. The compilation itself, according to the information from the page, took 4 seconds. The bottleneck is afterRenderComponent com_componentbuilder (2.65MB) (2527.31s) Joomla is installed on local machine via WSL (apache2 + mysql). On my machine access to the Internet is through a proxy server. A proxy server may restrict access to some IPs and domains. ### Steps to reproduce the Bug Simply click on the Compiler button in the ‘Components - ✓ Component Builder’ menu ### Which Joomla version are you compiling in? Joomla! 5.2.3 Stable [ Uthabiti ] 7-January-2025 16:00 GMT ### Which PHP version are you compiling in? 8.3.6 ### Which Joomla versions are you targeting? 5.2.3 ### Which PHP version are you targeting? 5.2.3 ### Which Web server is JCB running on? Apache 2.4 ### Which Relational Database is JCB running on? Mysql 8.0 ### Which OS is JCB running on? Ubuntu 24.04 via WSL ### Which JCB version are you using? 5.1.0-rc4 ### Where in JCB did this issue occur? Installation of a component, Compiler(admin_view) ### On which browsers did you encounter the issue? Firefox, Microsoft Edge ### Additional Comments _No response_
Phalaphun added the
Bug
label 2025-02-15 09:51:29 +00:00
Owner

Detailed Flow of the Compiler and Page Loading

  1. Initial Page Load:

    • UI and Assets:
      When you click on the Compiler button in the Components - ✓ Component Builder menu, the compiler page begins loading. This page is built dynamically and includes not only the core compilation tools but also several visual and functional assets:
      • Banners:
        The page pulls in eye-catching banners from our internal system using a specific API call. You can review the code that retrieves the banner details here.

        Note: You can disable or remove the banners to test whether they are contributing to the delay.

      • JavaScript-Loaded Elements:
        In addition to static images, the page loads JavaScript-driven elements like social feeds (from Joomla.Social) and other dynamic content. These external calls are initiated immediately after the page loads.
  2. Compilation and Post-Render Process:

    • Component Compilation:
      The actual component compilation process is swift (approximately 4 seconds). However, once the component is compiled, an afterRenderComponent process kicks in. This step is responsible for assembling additional data (roughly 2.65MB) and enriching the UI.
    • External Resource Checks:
      During this phase, JCB:
      • Queries the Community API:
        It makes a call to our API at https://api.joomlacomponentbuilder.com/v1/network/community/jcb to check the status of various community and repository servers.
      • Fallback Mechanism:
        Our system is designed to be decentralized. If one server is unavailable—often due to DOS attacks targeting our infrastructure—the tool automatically attempts to connect to alternative servers. You can see the real-time status of these systems on our JCB status page.
  3. Impact of the Proxy:

    • Proxy Restrictions:
      If you're running JCB behind a proxy that restricts or delays access to external domains, several issues may occur:
      • Delayed or Blocked External Calls:
        Calls to retrieve the banners, social feeds, or to check the server status (via the API) can be significantly slowed down. The proxy may block or delay these calls until a timeout occurs.
      • Cascading Delays:
        Although the compilation itself is fast, the cumulative delays from these external calls (especially those made during the afterRenderComponent phase) result in the compiler page taking an exceptionally long time to fully load.
  4. Environment and Recommendations:

    • Browser Support:
      We have determined that JCB works best in Firefox (or its variant LibreWolf). Microsoft Edge and Chrome are known to have compatibility issues.
    • Using Docker for a Unified Environment:
      • Docker Recommendation:
        JCB is a large application and our internal support is focused on Linux environments. For a consistent experience, we recommend using a Docker-based setup.
      • OctoJoom Tool:
        To facilitate this, our OctoJoom tool can help you deploy a Joomla environment using Docker. Although it currently runs on Mac and Ubuntu, you can generate Docker Compose files and run them on Windows as well.
    • VPN Alternative:
      If Docker isn’t an option, using a VPN instead of a restrictive proxy can often bypass these external call issues.
  5. JCB’s Disruptive and Decentralized Nature:

    • Disruptive Service:
      JCB is built to be a disruptive service in the Joomla ecosystem—designed to operate without reliance on any single company (like GitHub) and to resist attempts by larger entities to limit its functionality.
    • Decentralized Fallbacks:
      Our engine leverages a decentralized network of community servers to ensure that the service remains online even under DOS attacks. This decentralized approach is part of our vision for a resilient and unstoppable tool.
    • Potential Adjustments:
      Due to ongoing DOS attacks, we are considering moving the banner resource to another system to increase availability. Meanwhile, if you suspect that the banner calls are a significant factor in the delay, you can remove them to test the difference in load times.

In Summary

  • What’s Happening:
    The delay in the compiler page is primarily due to external calls made after the core component compilation. These include fetching banners, social feeds, and server status checks through our API.

  • Proxy Impact:
    A restrictive proxy can block or slow these calls, resulting in long load times even though the actual compilation is fast.

  • Recommendations:

    • Use Firefox/LibreWolf.
    • Consider a Docker setup using the OctoJoom tool for a unified Linux-based environment.
    • Alternatively, use a VPN to avoid proxy issues.
    • If needed, try disabling the banners to isolate the cause of the delay.
  • Philosophy Behind JCB:
    JCB is intentionally built as a disruptive, decentralized service. This design allows it to operate resiliently despite external pressures and DOS attacks, ensuring an "always online" experience through redundant fallback mechanisms.

### Detailed Flow of the Compiler and Page Loading 1. **Initial Page Load:** - **UI and Assets:** When you click on the **Compiler** button in the **Components - ✓ Component Builder** menu, the compiler page begins loading. This page is built dynamically and includes not only the core compilation tools but also several visual and functional assets: - **Banners:** The page pulls in eye-catching banners from our internal system using a specific API call. You can review the code that retrieves the banner details [here](https://git.vdm.dev/joomla/Component-Builder/src/commit/442263e387597cfaca45b1133ffa5f1c7078478a/admin/src/Helper/ComponentbuilderHelper.php#L2009). > **Note:** You can disable or remove the banners to test whether they are contributing to the delay. - **JavaScript-Loaded Elements:** In addition to static images, the page loads JavaScript-driven elements like social feeds (from Joomla.Social) and other dynamic content. These external calls are initiated immediately after the page loads. 2. **Compilation and Post-Render Process:** - **Component Compilation:** The actual component compilation process is swift (approximately 4 seconds). However, once the component is compiled, an `afterRenderComponent` process kicks in. This step is responsible for assembling additional data (roughly 2.65MB) and enriching the UI. - **External Resource Checks:** During this phase, JCB: - **Queries the Community API:** It makes a call to our API at [https://api.joomlacomponentbuilder.com/v1/network/community/jcb](https://api.joomlacomponentbuilder.com/v1/network/community/jcb) to check the status of various community and repository servers. - **Fallback Mechanism:** Our system is designed to be decentralized. If one server is unavailable—often due to DOS attacks targeting our infrastructure—the tool automatically attempts to connect to alternative servers. You can see the real-time status of these systems on our [JCB status page](https://status.vdm.dev/status/jcb). 3. **Impact of the Proxy:** - **Proxy Restrictions:** If you're running JCB behind a proxy that restricts or delays access to external domains, several issues may occur: - **Delayed or Blocked External Calls:** Calls to retrieve the banners, social feeds, or to check the server status (via the API) can be significantly slowed down. The proxy may block or delay these calls until a timeout occurs. - **Cascading Delays:** Although the compilation itself is fast, the cumulative delays from these external calls (especially those made during the `afterRenderComponent` phase) result in the compiler page taking an exceptionally long time to fully load. 4. **Environment and Recommendations:** - **Browser Support:** We have determined that JCB works best in **Firefox** (or its variant **LibreWolf**). Microsoft Edge and Chrome are known to have compatibility issues. - **Using Docker for a Unified Environment:** - **Docker Recommendation:** JCB is a large application and our internal support is focused on Linux environments. For a consistent experience, we recommend using a Docker-based setup. - **OctoJoom Tool:** To facilitate this, our [OctoJoom tool](https://git.vdm.dev/octoleo/octojoom) can help you deploy a Joomla environment using Docker. Although it currently runs on Mac and Ubuntu, you can generate Docker Compose files and run them on Windows as well. - **VPN Alternative:** If Docker isn’t an option, using a VPN instead of a restrictive proxy can often bypass these external call issues. 5. **JCB’s Disruptive and Decentralized Nature:** - **Disruptive Service:** JCB is built to be a disruptive service in the Joomla ecosystem—designed to operate without reliance on any single company (like GitHub) and to resist attempts by larger entities to limit its functionality. - **Decentralized Fallbacks:** Our engine leverages a decentralized network of community servers to ensure that the service remains online even under DOS attacks. This decentralized approach is part of our vision for a resilient and unstoppable tool. - **Potential Adjustments:** Due to ongoing DOS attacks, we are considering moving the banner resource to another system to increase availability. Meanwhile, if you suspect that the banner calls are a significant factor in the delay, you can remove them to test the difference in load times. --- ### In Summary - **What’s Happening:** The delay in the compiler page is primarily due to external calls made after the core component compilation. These include fetching banners, social feeds, and server status checks through our API. - **Proxy Impact:** A restrictive proxy can block or slow these calls, resulting in long load times even though the actual compilation is fast. - **Recommendations:** - Use **Firefox/LibreWolf**. - Consider a **Docker setup** using the [OctoJoom tool](https://git.vdm.dev/octoleo/octojoom) for a unified Linux-based environment. - Alternatively, use a **VPN** to avoid proxy issues. - If needed, try disabling the banners to isolate the cause of the delay. - **Philosophy Behind JCB:** JCB is intentionally built as a disruptive, decentralized service. This design allows it to operate resiliently despite external pressures and DOS attacks, ensuring an "always online" experience through redundant fallback mechanisms.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: joomla/Component-Builder#1206
No description provided.