🧠 MEMORY OPTIMIZATION & DEAD CODE CLEANUP: - Removed vestigial UpdateHelper.lsl (204 lines, ~41KB memory waste) - Main Controller memory improved from 83.8% to 81.4% (2.4% reduction) - Simplified Verbose_Logger from 149 to 80 lines (47% reduction) - Eliminated unused buffering systems and timer overhead 🎨 BOT PROFILE PICTURE FIX: - Fixed bot avatars randomly turning into gray boxes mid-game - Modified refreshPlayerDisplay() to preserve active player textures - Enhanced bot caching to prevent HTTP requests - Stable bot visuals throughout entire game 🏗️ ARCHITECTURE OPTIMIZATION: - Updated link numbers: Scoreboard (2→12), Leaderboard (25→35), Dice (73→83) - Enhanced prim structure with dedicated overlay prims (links 2-11) - Updated 11 scripts with new mappings and prim ranges - More organized and scalable linkset structure 🔧 ENHANCED GAME LOGIC & BUG FIXES: - Improved number picker parsing for CSV and semicolon formats - Enhanced bot round detection and fair play mechanics - Better communication handling and player feedback - Whitespace handling for consistent number parsing 📊 PERFORMANCE IMPACT: - Measurable memory reduction across multiple scripts - Eliminated profile picture flickering and display issues - Reduced unnecessary inter-script message traffic - Cleaner, more maintainable codebase Files changed: 11 modified scripts, 4 updated documentation files Total: 838 insertions, 776 deletions representing significant optimization
31 lines
No EOL
1,013 B
Text
31 lines
No EOL
1,013 B
Text
// === MEMORY REPORTING TEMPLATE ===
|
|
// Add this to the state_entry() of every script to track memory usage
|
|
|
|
// Add this function to every script:
|
|
reportMemoryUsage(string scriptName) {
|
|
integer used = llGetUsedMemory();
|
|
integer free = llGetFreeMemory();
|
|
integer total = used + free;
|
|
float percentUsed = ((float)used / (float)total) * 100.0;
|
|
|
|
llOwnerSay("🧠 [" + scriptName + "] Memory: " +
|
|
(string)used + " used, " +
|
|
(string)free + " free (" +
|
|
llGetSubString((string)percentUsed, 0, 4) + "% used)");
|
|
}
|
|
|
|
// Add this to state_entry() in every script:
|
|
state_entry() {
|
|
// Replace "SCRIPT_NAME" with the actual script name
|
|
reportMemoryUsage("SCRIPT_NAME");
|
|
|
|
// ... rest of existing state_entry() code ...
|
|
}
|
|
|
|
// Add this to on_rez() in every script:
|
|
on_rez(integer start_param) {
|
|
// Replace "SCRIPT_NAME" with the actual script name
|
|
reportMemoryUsage("SCRIPT_NAME");
|
|
|
|
// ... rest of existing on_rez() code ...
|
|
} |