Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Maestro Maestro
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • RiscOS
    • SSources
  • Apps
  • MaestroMaestro
  • Merge requests
  • !8

Merged
Created Mar 03, 2022 by Chris Wraight@cwraightDeveloper

Simplify Gate data

  • Overview 3
  • Commits 1
  • Changes 3

Maintaining and improving Maestro is made difficult due to the complicated way it stores data for the score symbols ('Gates'). The data is divided between a stream of 1 or 2-byte blocks containing most of the Gate attributes, plus three very large integer arrays that store the x position, width and object type for all Gates in the file. This is wasteful of memory for small scores, imposes a hard limit on file sizes, and requires fiddly syncing and converting between two sets of pointers.

This merge request:

  • expands the Gate blocks in memory to 2 words, and uses this to store all Gate data (format documented in updated Notes file)
  • removes the big arrays PX%(), PTYPE%() and PW%(), plus checks on maximum gates on file load
  • updates the typesetting, printing and load/save routines to use the simpler system

This results in a smaller initial wimpslot, enables loading files larger than the old max_gate% limit, and is faster (especially for printing). The code is simplified, making further improvements in redraw speed or adding features easier. Looking further down the line, it's a first step to making proper multi-file editing possible.

N.B. There's one remaining limit on file sizes - a maximum bar number (currently 512). This would be easy to remove in a future submission.

Edited Mar 03, 2022 by Chris Wraight
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: SimplifyGates1