Dusting off very old AI2 apps, looking for offline AI2

FYI, I was able to get the AI2Offline from "AI2Offline download | SourceForge.net" for Linux working on my Ubuntu 22. Thank you.

Hint (this works the best):
startAll.sh <===== Linux: Just run this in terminal! then URL: http://localhost:8888

If you would like to send me a copy of the project, I can ask someone from our team to analyze why the performance might be so poor when loading it in Chrome.

It's actually the same thing in both Firefox and Chrome, and also in the AI2Offline local version... click "Blocks" button and it's about 1-2 min. of audibly disk winding up, but then it calms down and Blocks load up after that and can be used no problem, so it is consistent which is good. Below I've provided a 'top' output during the issue, and right after it has wound down. You can see the processes involved. In the second screenshot, it shows Threads for the Isolated Web Co process, and one of them gets hammered at 100%CPU. So this is FYI if it helps.

How old is that PC?

8 of these vCPUs with Ubuntu 22... should give you an indication. But the computer I used in 2014 was not this one. :wink: (FYI I can l live with the delay as it is consistent, and I know what to expect, so this is just informational for you.)

https://www.dell.com/support/manuals/en-us/optiplex-7470-aio/opti7470_setup_specifications/system-specifications?guid=guid-9ecbe211-f3e6-41d5-82f4-9f7957b52a71&lang=en-us

dmidecode
Processor Information
Socket Designation: U3E1
Type: Central Processor
Family: Core i7
Manufacturer: Intel(R) Corporation
ID: ED 06 09 00 FF FB EB BF
Signature: Type 0, Family 6, Model 158, Stepping 13
Version: Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz
Voltage: 0.9 V
External Clock: 100 MHz
Max Speed: 4400 MHz
Current Speed: 2970 MHz
Status: Populated, Enabled
Upgrade: Socket LGA1151
L1 Cache Handle: 0x0012
L2 Cache Handle: 0x0013
L3 Cache Handle: 0x0014
Core Count: 8
Core Enabled: 8
Thread Count: 8

Maybe time for an SSD upgrade?

You have not told us how many blocks are in your app (especially Screen1), or what you are running in Screen.Initialise on Screen1?

Note: do not move aia projects back and forth between MIT AppInventor (online) and your offline AppInventor clone. You will have problems. Stick with one or the other.

I'm sure that would not hurt :slight_smile: however, the interesting thing with the top readings I posted before, is the only thing that went up was the one process thread going to 100% CPU and I see it using up to 3 - 11 GB of virtual memory as User mem goes up (not Swap though so it appears to be actual Memory), but the Load only slightly went up, while the Wait% did not go up, which I would expect if the disk was really having issues keeping up. So based on that, it seems more about a process using a lot of CPU time during loading the Blocks screen. The Isolated Web Co process looks multithreaded, but only one appears t be doing all the work during load up, though I didn't note if that is the parent.

Well, I posted a screenshot to given an overall idea, because honestly did not really know how you count "Blocks" unless you are literally counting all the puzzle pieces small and large. Looking at that screenshot which you can enlarge (and it is Screen1) it's estimate 400 pieces per screenshot (scrolling down), so x4 so maybe 1600. I do have a suspicion it is the sound files doing it, as I have mentioned before I think.

Far as using online AI2 vs. CODE vs. local AI2Offline, you are just seeing me evaluate those platforms, and what works best, etc. before selecting which one... will likely be CODE, as was mentioned to me early in this thread. I have no intention of using all or more than one, would be a headache.

Anyway, as I said, I can live with the pause during the loadup, since it is consistent, so no worries.

In the blocks editor, right click on some white space. The popupmenu will show the number of blocks.

Ok, the closest right-click item seems to be "Delete 2937 blocks" (yikes!) for a Concert Zither app., and 1438 blocks for a "Fussball" (Soccer) app. Both of these also use code that uses the position sensors to update the screen items. Thanks for pointing this out, I had not discovered that blocks count, yet.

Note also that the count is per screen, so if you have many screens in a project that will add up as well.

and this ?

Your previously posted blocks are unreadable

Per screen

If you mean Screen.1 referring to how many Designer screens there are, there is just one Designer screen in each application... those apps change what goes on in the same screen, so the logic and settings are about that, such as changing the notes+colors+sounds, and as the phone is rotated, and similar for the football app changing the location of players based on an algorithm.

blocks unreadable

The screenshot of the blocks was to give an idea of how many there are before I knew about the blocks count item... You have to understand I was not giving away the code (yet)...

So again, I am not worrying about the 1-2 min. wait for Blocks screen to come up, as it is consistent, and it is less of an issue for the football app which has far less sound files, which is why I keep wondering if it is that. Also, something that I think is getting lost, is in 2014 on a lesser computer system, I was not experiencing this wait on loading the Blocks screen, but now on a better system it is happening. And I believe it's already been mentioned that in 2017 the AI2 code was updated and may load slower with large AI2 apps.

We are in the process of updating to the latest version of Blockly (the library that renders the blocks workspace). You could try loading your project there and seeing if there is any improvement in the performance:

Note that this is still experimental and it could introduce bugs in your code, so please make sure to keep backup copies of your projects.

Thank you greatly, ewpatton, I would be happy to try Blockly, and report back.... No worries I have lots of copies.

Good news ewpatton, I uploaded the zither app to Blockly, got into the Designer no problem, and clicked Blocks and got into that speed of light.. ok speed of a click. No loading problems there at all. FYI

Thanks for following up. That's great to hear that it improves the performance on your project.

You're welcome, but thank you... I don't know what sorts of bugs there may be from Blockly use (won't do any development in Blockly of course) but just for good measure I also looked through my Blocks/code and didn't see any broken or disconnected blocks, FYI.

One other item I just noticed in Designer... it shows the cellphone/tablet device and the default Screen1... in several apps, I see that the bottom of the view (cellphone screen) is cut off a certain amount - roughly 1/5th of the view - by the cellphone screen rendering. But, I tried those apps in AI Companion, and they look fine there. So not sure if something may have changed in the Designer display of the device. I don't think this was an issue before (2014) but it's been some time.

Hello ewpatton,

Not too long ago I had tried Blockly with large blocks app, and it worked very well, no load on the disk... I then went back to using "code.appinventor.mit.edu" and it appears to be doing pretty well too.

Today I just noticed that "code." was updated two days ago:
Built: August 21 2024 Version: code50

And, what I have been noticing last couple days is the disk load (which usually lasts about 2 minutes then subsides and I can get into the Blocks screen) has re-emerged, and additionally, when I edit the blocks in Blocks screen, it continues to be problematic when editing blocks in the Blocks screen... load occurs and you have to wait (15 seconds or more) each time you click or unclick or move, etc. a block.

So it looks to me that the updated "code50" has re-introduced an issue.

FYI and please advise if possibly the solutions from Blockly may get backported into code. ? Thank you.

PGB