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

Hoist proc gen functions #120

Merged
merged 1 commit into from
Dec 27, 2023
Merged

Hoist proc gen functions #120

merged 1 commit into from
Dec 27, 2023

Conversation

Tidyzq
Copy link
Contributor

@Tidyzq Tidyzq commented Dec 21, 2023

Hoist proc gen functions to increase updating performance.

proc-gen before this pr:

return (() => {
  var G = {};
  var R = {};
  var X = function (a) {
    return a == null ? Object.create(null) : a;
  };
  var Y = function (a) {
    return a == null ? "" : String(a);
  };
  var Z = function (a, b) {
    if (a === true) return true;
    if (a) return a[b];
  };
  var P = function (a) {
    return typeof a === "function" ? a : () => {};
  };
  G[""] = (() => {
    var H = {};
    var S;
    var I = (P) => {
      if (!S) S = Object.assign({}, H);
      return S[P];
    };
    H[""] = (R, C, D, U) => {
      var L = R.c;
      var M = R.m;
      var O = R.r;
      var A = {};
      var K = U === true;
      return {
        C: (C, T, E, B, F) => {
          F(
            D.list,
            null,
            U ? U.list : undefined,
            [0, "list"],
            (C, a, b, c, d, e, T, E) => {
              E(
                "div",
                {},
                (N, C) => {},
                (C, T, E) => {
                  E(
                    "x-c",
                    {},
                    (N, C) => {
                      if (C || K || c) O(N, "s", a);
                    },
                    (C, T) => {
                      C || K || d ? T(Y(b)) : T();
                    }
                  );
                }
              );
            }
          );
        },
        B: A,
      };
    };
    return Object.assign(
      function (R) {
        return H[R];
      },
      { _: H }
    );
  })();
  return G;
})();

proc-gen after this pr:

return (() => {
  var G = {};
  var R = {};
  var X = function (a) {
    return a == null ? Object.create(null) : a;
  };
  var Y = function (a) {
    return a == null ? "" : String(a);
  };
  var Z = function (a, b) {
    if (a === true) return true;
    if (a) return a[b];
  };
  var P = function (a) {
    return typeof a === "function" ? a : () => {};
  };
  G[""] = (() => {
    var H = {};
    var S;
    var I = (P) => {
      if (!S) S = Object.assign({}, H);
      return S[P];
    };
    H[""] = (() => {
      var L,
        M,
        O,
        A,
        K,
        R,
        D,
        U,
        b,
        c,
        d,
        e,
        f,
        i = (C, T) => {
          C || K || e ? T(Y(c)) : T();
        },
        h = (C, T, E) => {
          E(
            "x-c",
            {},
            (N, C) => {
              if (C || K || d) O(N, "s", b);
            },
            i
          );
        },
        g = (C, $A, $B, $C, $D, $E, T, E) => {
          (b = $A), (c = $B), (d = $C), (e = $D), (f = $E);
          E("div", {}, (N, C) => {}, h);
        },
        a = (C, T, E, B, F) => {
          F(D.list, null, U ? U.list : undefined, [0, "list"], g);
        };
      return (j, C, k, l) => {
        R = j;
        D = k;
        U = l;
        L = R.c;
        M = R.m;
        O = R.r;
        A = {};
        K = U === true;
        return { C: a, B: A };
      };
    })();
    return Object.assign(
      function (R) {
        return H[R];
      },
      { _: H }
    );
  })();
  return G;
})();
image

@Tidyzq Tidyzq requested a review from LastLeaf December 21, 2023 10:53
@Tidyzq Tidyzq force-pushed the feat-hoist-proc-gen branch 2 times, most recently from 4a5a44c to 3b828f7 Compare December 25, 2023 13:20
@Tidyzq Tidyzq merged commit 1631579 into master Dec 27, 2023
8 checks passed
@Tidyzq Tidyzq deleted the feat-hoist-proc-gen branch December 27, 2023 06:29
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

1 participant