# Start up performance of arcade iframe embed

**URL:** https://forum.makecode.com/t/start-up-performance-of-arcade-iframe-embed/1938
**Category:** Help
**Created:** [May 4, 2020, 12:50am UTC](https://forum.makecode.com/t/start-up-performance-of-arcade-iframe-embed/1938 "2020-05-04T00:50:08Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![jacob\_c](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jacob_c/32/1532_2.png) [@jacob\_c](https://forum.makecode.com/u/jacob_c)
#### Post date: [May 4, 2020, 12:50am UTC](https://forum.makecode.com/t/start-up-performance-of-arcade-iframe-embed/1938/1 "2020-05-04T00:50:09Z")

</div>

For fun/learning, I threw together a site with Gatsby and hosted it on github pages collecting some of the games I’ve made with makecode arcade: [https://jacobcarpenter.com/makecode](https://jacobcarpenter.com/makecode).

I’ve been really impressed with the Gatsby site’s performance. It’s fun writing React that essentially turns into static content.

However, on the individual game pages, the makecode simulator embed that I’m using seems to monopolize JS execution for several uninterrupted seconds on my computer (with no CPU throttling):

 ![Screen Shot 2020-05-03 at 5.24.43 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/994ff1244bdfc1947a39ada828826d8b15a758ed.png)

On my phone, the result is even worse. The page becomes unresponsive (scrolling, navigating), during the time the uninterrupted `compile` function is running.

Am I using the embed incorrectly? Am I perhaps linking to the wrong resource or something? I’d love to hear any suggestions you may have to make this faster!

To be clear: I’m not concerned about the total _duration_ that “Loading…” is displayed for. I’m specifically interested in not utilizing all of the browser’s script execution resources for a long, uninterrupted chunk of time.

Thanks!

---

<div class="post-metadata">

### Author: ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)
#### Post date: [May 4, 2020, 1:20am UTC](https://forum.makecode.com/t/start-up-performance-of-arcade-iframe-embed/1938/2 "2020-05-04T01:20:08Z")

</div>

As you noticed, a lot of that time is likely just the compiler building the game - you can get around that entirely by using the github pages built with beta, which build a precompiled version of the game on each bump and load that instead - here’s a page with a bunch of sims at once using that: [jwunderl.dev/examples](http://jwunderl.dev/examples) (it’s a bit ugly, I only tend to update it when I wanna try something new e.g. react router or react transition groups).

---

<div class="post-metadata">

### Author: ![jacob\_c](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jacob_c/32/1532_2.png) [@jacob\_c](https://forum.makecode.com/u/jacob_c)
#### Post date: [May 4, 2020, 1:23am UTC](https://forum.makecode.com/t/start-up-performance-of-arcade-iframe-embed/1938/3 "2020-05-04T01:23:46Z")

</div>

Ooh. Yes. Okay… _more_ incentive to use the beta GitHub integration.

That page you linked to works great, even on my phone. Thanks!

---

<div class="post-metadata">

### Author: ![peli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/peli/32/12_2.png) [@peli](https://forum.makecode.com/u/peli)
#### Post date: [May 4, 2020, 5:21am UTC](https://forum.makecode.com/t/start-up-performance-of-arcade-iframe-embed/1938/4 "2020-05-04T05:21:41Z")

</div>

We precomiple the JavaScript and avoid the iframes in the GitHub integration.

---

<div class="post-metadata">

### Author: ![jacob\_c](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jacob_c/32/1532_2.png) [@jacob\_c](https://forum.makecode.com/u/jacob_c)
#### Post date: [May 5, 2020, 3:37am UTC](https://forum.makecode.com/t/start-up-performance-of-arcade-iframe-embed/1938/5 "2020-05-05T03:37:27Z")

</div>

I locally tested putting meadow onto github and using the prebuilt version as the embed and performance is indeed much better!

Question: Is there a way to point my pages at a specific `release`? I’d like to retain the ability to be able to iterate on a project (with commit history) without overwriting what’s deployed and referenced by my site.

---

<div class="post-metadata">

### Author: ![jacob\_c](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jacob_c/32/1532_2.png) [@jacob\_c](https://forum.makecode.com/u/jacob_c)
#### Post date: [May 5, 2020, 7:45pm UTC](https://forum.makecode.com/t/start-up-performance-of-arcade-iframe-embed/1938/6 "2020-05-05T19:45:17Z")

</div>

> Question: Is there a way to point my pages at a specific `release` ? I’d like to retain the ability to be able to iterate on a project (with commit history) without overwriting what’s deployed and referenced by my site.

Yes, it looks like this is how releases work already! From some testing it looks like the pages version of the site always reflects the latest `release`.

I think I was initially confused by some of the UI (all of this is about `/beta`):

1. after committing to a repo that already has a release, the dialog displays the following:

 ![Screen Shot 2020-05-05 at 11.32.23 AM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/ab18672849904cdf4dbc71238ee27244cf84d8fb.png)

1. (continued…) “Pages building” is confusing, because it seems like, if there’s a release, Pages doesn’t actually update after a commit. (Which is exactly the desired behavior I want; but the status message seems confusing.)

2. While testing this, I think I ran into a bug: after creating a release for testing, I reverted a commit (using the History commit list UI). _Then_ I created another release. But the version number in `version.txt` had been reverted by the revert commit, so the next version number was improperly computed.

---

<div class="post-metadata">

### Author: ![peli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/peli/32/12_2.png) [@peli](https://forum.makecode.com/u/peli)
#### Post date: [May 5, 2020, 8:29pm UTC](https://forum.makecode.com/t/start-up-performance-of-arcade-iframe-embed/1938/7 "2020-05-05T20:29:38Z")

</div>

Github rebuilds page on every commit and the button reflects that. It might be that you updated README.md and it is getting updated. The javascript is only update on release – it’s pretty big and would bloat the commits.

---

<div class="post-metadata">

### Author: ![peli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/peli/32/12_2.png) [@peli](https://forum.makecode.com/u/peli)
#### Post date: [May 5, 2020, 8:30pm UTC](https://forum.makecode.com/t/start-up-performance-of-arcade-iframe-embed/1938/8 "2020-05-05T20:30:05Z")

</div>

Yeah… reverting and version numbers. Did you end up overriding an existing release?

---

<div class="post-metadata">

### Author: ![peli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/peli/32/12_2.png) [@peli](https://forum.makecode.com/u/peli)
#### Post date: [May 5, 2020, 8:34pm UTC](https://forum.makecode.com/t/start-up-performance-of-arcade-iframe-embed/1938/9 "2020-05-05T20:34:08Z")

</div>

> [@jacob\_c](#):
>
> his, I think I ran into a bug: after creating a release for testing, I reverted a commit (using the History commit list UI). _Then_ I created another relea

I guess we are ready the version number from pxt.json and not github so you’ll probably end up with 2 version numbers unless you are careful. I should test if the version number already exists in the selection dialog.

---

<div class="post-metadata">

### Author: ![jacob\_c](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jacob_c/32/1532_2.png) [@jacob\_c](https://forum.makecode.com/u/jacob_c)
#### Post date: [May 5, 2020, 8:45pm UTC](https://forum.makecode.com/t/start-up-performance-of-arcade-iframe-embed/1938/10 "2020-05-05T20:45:21Z")

</div>

> [@peli](#):
>
> Github rebuilds page on every commit and the button reflects that. […] The javascript is only updated on release.

Yes, I think I understand. The distinction is subtle, but I get it.

> [@peli](#):
>
> Did you end up overriding an existing release?

Yes, I think that’s what happened. In tags view and on the releases tab, I only see two version numbers (`1.0.0` and `1.0.1`), despite the fact that I have made three releases (using the Release button in makecode). The third release seems to have overwritten the previous `1.0.1`.
