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

compact heirarchy #38

Merged
merged 7 commits into from
Mar 11, 2025
Merged

compact heirarchy #38

merged 7 commits into from
Mar 11, 2025

Conversation

michaelneale
Copy link
Collaborator

@michaelneale michaelneale commented Mar 10, 2025

This hopefully increases speed and accuracy by using a more compact plain text format for ui hierarchy vs json

using benchmark.sh it seems a little quicker and more accurate (but still only small numbers of runs).

eg

 FrameLayout [0,0,1280,2856]
     LinearLayout [0,0,1280,2856]
		FrameLayout [0,0,1280,2856]
			 LinearLayout id="com.google.android.apps.maps:id/action_bar_root" [0,0,1280,2856]
				FrameLayout id="android:id/content" [0,0,1280,2856]
					ViewGroup [0,0,1280,2856]

style - with "what is the weather like" is around 13989 chars when first navigating the screen.

old is: 36102 (just characters, not tokens). Likely could be compressed a lot more.

benchmark:

image

old bench mark:

image

Copy link
Collaborator

@DOsinga DOsinga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great to see this implemented; I think you mentioned this the other day. One thing I wonder is if we can modify the stats tool to get the token count out too, it would help here I guess. Also the times you are showing do seem to be more all over the place then I typically see.

@michaelneale
Copy link
Collaborator Author

@DOsinga yeah I am not sure the times make sense yet, haven't worked out how to really know when it was completed. I wonder if exact timing less important until we have more scenarios and more passing?

@michaelneale michaelneale merged commit fa9194f into main Mar 11, 2025
1 check passed
@michaelneale michaelneale deleted the micn/compact-heirarchy branch March 11, 2025 00:45
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.

3 participants