Skip to content

Conversation

@MaartenS11
Copy link
Member

Currently only uses run length encoding to transfer snapshots from the microcontroller to the computer, not the other way around. The VSCode plugin will need changes to be able to reconstruct the actual bytes in memory.

@tolauwae tolauwae added the performance Performance issue/improvement label Sep 26, 2024
@tolauwae
Copy link
Member

💥 Breaking change warning
TOPLLab/WARDuino-VSCode will not be able to parse the new snapshots

@tolauwae
Copy link
Member

I want to add this change for the new major release @MaartenS11
If you need any help, you can ping me

@tolauwae tolauwae changed the title Use run length encoding for memory when taking a snapshot 🐎 RLE for memory in snapshots Sep 26, 2024
@tolauwae tolauwae linked an issue Nov 21, 2024 that may be closed by this pull request
@MaartenS11 MaartenS11 force-pushed the feat/run-length-memory branch from 5f84da6 to 867c0db Compare November 25, 2024 10:50
@MaartenS11 MaartenS11 marked this pull request as ready for review November 25, 2024 16:48
@MaartenS11 MaartenS11 requested a review from tolauwae December 2, 2024 15:57
@tolauwae
Copy link
Member

tolauwae commented Dec 2, 2024

@MaartenS11 so you implemented a simple run-length encoding yourselves? And it just shortens consecutive strings as the pattern and number of occurrences separated by a comma? pattern,count
And it does this every time, even when the count is one.

Is that correct?

@MaartenS11
Copy link
Member Author

@MaartenS11 so you implemented a simple run-length encoding yourselves? And it just shortens consecutive strings as the pattern and number of occurrences separated by a comma? pattern,count And it does this every time, even when the count is one.

Is that correct?

It's count,pattern but besides that, yes that's how it works. You can't really not do it for sequences of length 1 because you have no way to identify if the byte is a count or the pattern itself.

Copy link
Member

@tolauwae tolauwae left a comment

Choose a reason for hiding this comment

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

Looks good. Although I would move the RLE to separate util functions.
But can be merged as is.

@tolauwae tolauwae enabled auto-merge (squash) December 14, 2024 16:25
@tolauwae tolauwae merged commit c73a20b into main Dec 14, 2024
17 checks passed
@tolauwae tolauwae deleted the feat/run-length-memory branch December 14, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Performance issue/improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compress memory in snapshots

3 participants