Problem/Motivation

The module currently loads /{{ACE_DIRECTORY}}/src/ js files by default. The ACE builds package offers minified js and using them instead results in smaller js size loaded and delivered over the network.

Steps to reproduce

Enable the filter on a text format. Add content on a page using the ace syntax and check the network loaded assets. They will be from the regular src directory.

Proposed resolution

Update ace_editor_lib_path() to detect and use the src-mindirectory if available.

Issue fork ace_editor-3322712

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

angrytoast created an issue. See original summary.

angrytoast’s picture

Status: Active » Needs review

Testing results with usage that loads 3 ace-build files:
1. ace.js
2. mode-javascript.js
3. theme-cobalt.js

Before

Network transfer size: 193kB
Total loaded size: 753kB

After

Network transfer size: 132kB
Total loaded size: 392kB

Overall it's ~31% reduction in the network transfer and ~47% reduction for total loaded size.

rajab natshah’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
Status: Needs review » Needs work

Needs an updated issue fork and MR for the 2.0.x branch

rajab natshah’s picture

Status: Needs work » Needs review

  • rajab natshah committed 21c6d821 on 2.0.x
    feat: #3322712 Prefer the minified no-conflict Ace build and keep it out...
rajab natshah’s picture

Status: Needs review » Fixed

Merged as 21c6d82 in !29, which builds on Gary Gao’s work in !6 — credit to Gary Gao for the analysis and the original patch.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

rajab natshah’s picture

Issue tags: +ace_editor-2.0.4

✅ Released ace_editor-2.0.4

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.