WIP: bsbport optimize ram usage