AnHardt / Marlin

Reprap FW with look ahead. SDcard and LCD support. It works on Gen6, Ultimaker, RAMPS and Sanguinololu
GNU General Public License v3.0
1 stars 1 forks source link

Lcd speedup #13

Closed AnHardt closed 7 years ago

AnHardt commented 8 years ago

LCD-Speedup A collection of little speed improvements, mainly for the graphical displays. For a RAMPS, REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, 1 etruder, bed, fan, SD-support the improvements sum up to ~ -33%. Expect more win with the other graphical displays. For the character displays speed is about the same. Memory use has not changed significantly. See details below.

https://code.google.com/p/u8glib/wiki/tpictureloop helps to understand what is going on, when i write about stripes here.

picture 165 picture 167 picture 170 Reduded perision if otherwise to wide: picture 171 picture 182 picture 172 picture 173 picture 175 picture 177 picture 178 picture 180 Update: picture 183


Added a little benchmark.

Some tests to get the current state:

Tests with different display content CLCD

define REPRAP_DISCOUNT_SMART_CONTROLLER

Der Sketch verwendet 75.344 Bytes (29%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 3.151 Bytes (38%) des dynamischen Speichers, 5.041 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 20-21ms Homed 20-21ms Extruder on 22ms

define REPRAP_DISCOUNT_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

Der Sketch verwendet 78.632 Bytes (30%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 3.165 Bytes (38%) des dynamischen Speichers, 5.027 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 23-24ms Homed 23-24ms Extruder on 24-25ms Extruder + bed on 25ms

define REPRAP_DISCOUNT_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

Der Sketch verwendet 97.138 Bytes (38%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.392 Bytes (53%) des dynamischen Speichers, 3.800 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 25-26ms Homed 26-27ms Extruder on 26-27ms Extruder + bed on 26-27ms

define REPRAP_DISCOUNT_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

commented lcd_implementation_status_screen() Der Sketch verwendet 95.138 Bytes (37%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.392 Bytes (53%) des dynamischen Speichers, 3.800 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 0ms Homed 0ms Extruder on 0ms Extruder + bed on 0ms

Tests with different display content GLCD

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

Der Sketch verwendet 84.372 Bytes (33%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 3.648 Bytes (44%) des dynamischen Speichers, 4.544 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 72ms Homed 75-76ms Fan100% 77-78ms Extruder on 78-79ms

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

Der Sketch verwendet 88.244 Bytes (34%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 3.662 Bytes (44%) des dynamischen Speichers, 4.530 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 72-73ms Homed 76-77ms Fan100% 78ms Extruder on 79ms Extruder + bed on 79ms

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

Der Sketch verwendet 107.810 Bytes (42%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.889 Bytes (59%) des dynamischen Speichers, 3.303 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 76-77ms Homed 81ms Fan100% 82ms Extruder on 83ms Extruder + bed on 84ms

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

commented lcd_implementation_status_screen() Der Sketch verwendet 104.820 Bytes (41%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.889 Bytes (59%) des dynamischen Speichers, 3.303 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 29-30ms Homed 29-30ms Fan100% 29-30ms Extruder on 29-30ms Extruder + bed on 29-30ms

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

//U8GLIB_ST7920_128X64_RRD u8g(0); U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS); // original u8glib device

define TEMP_SENSOR_BED 1

define SDSUPPORT

commented lcd_implementation_status_screen() Der Sketch verwendet 105.460 Bytes (41%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.898 Bytes (59%) des dynamischen Speichers, 3.294 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 59-60ms Homed 59-60ms Fan100% 59-60ms Extruder on 59-60ms Extruder + bed on 59-60ms // Marlins implementation of the device for the ST7920 is about 50% faster then the original u8glib device and 640bytes smaller!!!

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

define PAGE_HEIGHT 8 //128 byte framebuffer

//#define PAGE_HEIGHT 32 //512 byte framebuffer commented lcd_implementation_status_screen() Der Sketch verwendet 104.804 Bytes (41%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.505 Bytes (54%) des dynamischen Speichers, 3.687 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 29-30ms Homed 29-30ms Fan100% 29-30ms Extruder on 29-30ms Extruder + bed on 29-30ms // With 8 instead of 2 stripes the empty update loop is not slower. Transfer graphic buffer to display. Saves 392bytes RAM (512-128=384).

define U8G_10DELAY 3

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

define PAGE_HEIGHT 8 //128 byte framebuffer

//#define PAGE_HEIGHT 32 //512 byte framebuffer commented lcd_implementation_status_screen() Der Sketch verwendet 104.892 Bytes (41%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.505 Bytes (54%) des dynamischen Speichers, 3.687 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 27-28ms Homed 27-28ms Fan100% 27-28ms Extruder on 27-28ms Extruder + bed on 27-28ms

define U8G_10DELAY 3

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

commented lcd_implementation_status_screen() Der Sketch verwendet 104.908 Bytes (41%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.889 Bytes (59%) des dynamischen Speichers, 3.303 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 26-27ms Homed 26-27ms Fan100% 27-28ms Extruder on 26-27ms Extruder + bed on 26-27ms

define U8G_10DELAY 3

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

Der Sketch verwendet 107.898 Bytes (42%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.889 Bytes (59%) des dynamischen Speichers, 3.303 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 73-74ms Homed 78-79ms Fan100% 79-80ms Extruder on 81ms Extruder + bed on 81ms // With a reduced from 10 to 3 µs pause we can save about 2-3ms per display update. 2µs messed up my display - was to short. This may be different for other displays.

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

define PAGE_HEIGHT 8 //128 byte framebuffer

//#define PAGE_HEIGHT 32 //512 byte framebuffer Der Sketch verwendet 107.882 Bytes (42%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.505 Bytes (54%) des dynamischen Speichers, 3.687 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 111-112ms Homed 120-121ms Fan100% 123ms Extruder on 124-125ms Extruder + bed on 125-126ms

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

define PAGE_HEIGHT 16 //256 byte framebuffer

//#define PAGE_HEIGHT 32 //512 byte framebuffer Der Sketch verwendet 107.896 Bytes (42%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.633 Bytes (56%) des dynamischen Speichers, 3.559 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 89ms Homed 95-96ms Fan100% 96-97ms Extruder on 97ms Extruder + bed on 98-99ms // Increasing the number of stripes is disastrous. 7*stripes + 70 ~ time in ms

define VIKI2

some changes to pins_RAMPS_13.h where needed to compile

define TEMP_SENSOR_BED 1

define SDSUPPORT

Der Sketch verwendet 103.650 Bytes (40%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.508 Bytes (55%) des dynamischen Speichers, 3.684 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 156-157ms Homed 168-169ms Fan100% 172-173ms Extruder on 174-175ms Extruder + bed on 175-176ms // VIKI2 is known as extra slow. Here we see how slow. Thats more than 200% compared to ST7920VIKI2 and the other standard u8glib devises all use 8 stripes.

define VIKI2

some changes to pins_RAMPS_13.h where needed to compile // U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0); // 8 stripes U8GLIB_NHD_C12864_2X u8g(DOGLCD_CS, DOGLCD_A0); // 4 stripes

define TEMP_SENSOR_BED 1

define SDSUPPORT

Der Sketch verwendet 103.710 Bytes (40%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.636 Bytes (56%) des dynamischen Speichers, 3.556 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 125ms Homed 133-134ms Fan100% 135-136ms Extruder on 136-137ms Extruder + bed on 137ms // Not good, but much better!!! 9.75*stripes + 98 ~ time in ms

Test again

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

Der Sketch verwendet 107.898 Bytes (42%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.889 Bytes (59%) des dynamischen Speichers, 3.303 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 76-77ms Homed 81ms Fan100% 82ms Extruder on 83ms Extruder + bed on 84ms // unchanged

Remove the big heater graphic

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

//u8g.drawBitmapP(9,1,STATUS_SCREENBYTEWIDTH,STATUS_SCREENHEIGHT, (blink % 2) && fanSpeed ? status_screen0_bmp : status_screen1_bmp); Der Sketch verwendet 107.272 Bytes (42%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.889 Bytes (59%) des dynamischen Speichers, 3.303 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 67-68ms Homed 71-72ms Fan100% 73-74ms Extruder on 73-74ms Extruder + bed on 74-75ms

Remove the big heater graphic

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define SDSUPPORT

//u8g.drawBitmapP(9,1,STATUS_SCREENBYTEWIDTH,STATUS_SCREENHEIGHT, (blink % 2) && fanSpeed ? status_screen0_bmp : status_screen1_bmp); Der Sketch verwendet 103.410 Bytes (40%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.875 Bytes (59%) des dynamischen Speichers, 3.317 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 67-68ms Homed 71-72ms Fan100% 73-74ms Extruder on 73-74ms // unchanged

Remove the big heater graphic

define MOTHERBOARD BOARD_RAMPS_13_EEB

define EXTRUDERS 1

define TEMP_SENSOR_1 999

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

//u8g.drawBitmapP(9,1,STATUS_SCREENBYTEWIDTH,STATUS_SCREENHEIGHT, (blink % 2) && fanSpeed ? status_screen0_bmp : status_screen1_bmp); Der Sketch verwendet 107.370 Bytes (42%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.889 Bytes (59%) des dynamischen Speichers, 3.303 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 67-68ms Homed 71-72ms Fan100% 73-74ms Extruder on 74-75ms Extruder + bed on 74-75ms All heaters on 74-75ms

define MOTHERBOARD BOARD_RAMPS_13_EEB

define EXTRUDERS 1

define TEMP_SENSOR_1 999

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

Der Sketch verwendet 107.996 Bytes (42%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.889 Bytes (59%) des dynamischen Speichers, 3.303 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 76-77ms Homed 80-81ms Fan100% 81-82ms Extruder on 83ms Extruder + bed on 83-84ms All heaters on 83-84ms // drawing the big heater graphic needs about 10ms and is close to independent from the amount of drawn devices.

Replaced the big heater graphic with small graphics for the single devices and draw only what is needed.

define MOTHERBOARD BOARD_RAMPS_13_EEB

define EXTRUDERS 2

define TEMP_SENSOR_1 999

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

Der Sketch verwendet 112.280 Bytes (44%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.995 Bytes (60%) des dynamischen Speichers, 3.197 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 76-77ms Homed 81-82ms Fan100% 82-83ms Extruder on 82-83ms Extruder + bed on 83-84ms All heaters on 83-84ms // About the same speed

Replaced the big heater graphic with small graphics for the single devices and draw only what is needed.

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

Der Sketch verwendet 107.650 Bytes (42%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.891 Bytes (59%) des dynamischen Speichers, 3.301 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 72-73ms Homed 77-78ms Fan100% 78-79ms Extruder on 79-80ms Extruder + bed on 79-80ms

Replaced the big heater graphic with small graphics for the single devices and draw only what is needed.

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define SDSUPPORT

Der Sketch verwendet 103.418 Bytes (40%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.877 Bytes (59%) des dynamischen Speichers, 3.315 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 69-70ms Homed 73-74ms Fan100% 74-75ms Extruder on 75-76ms

Replaced the big heater graphic with small graphics for the single devices and draw only what is needed.

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define SDSUPPORT

define FAN_PIN -1 // (Sprinter config)

Der Sketch verwendet 103.022 Bytes (40%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.875 Bytes (59%) des dynamischen Speichers, 3.317 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 65-66ms Homed 70-71ms Extruder on 70-71ms

Replace the inverse bar in the middle with boundary lines Replaced the big heater graphic with small graphics for the single devices and draw only what is needed.

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

Der Sketch verwendet 107.712 Bytes (42%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.891 Bytes (59%) des dynamischen Speichers, 3.301 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 60-61ms Homed 64-65ms Fan100% 65-66ms Extruder on 66-67ms Extruder + bed on 66-67ms // About 5ms win!!!

Draw progress bar only when printing from SD / Alter SD symbol when SD-card is inserted. Replace the inverse bar in the middle with boundary lines Replaced the big heater graphic with small graphics for the single devices and draw only what is needed.

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

Der Sketch verwendet 107.748 Bytes (42%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.891 Bytes (59%) des dynamischen Speichers, 3.301 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. SD-card out Fresh reset 55-56ms Homed 59-60ms Fan100% 60-61ms Extruder on 61-62ms Extruder + bed on 62-63ms // About 5ms win!!! SD-card in Fresh reset 57-58ms Homed 61-62ms Fan100% 62-63ms Extruder on 63-64ms Extruder + bed on 63-64ms // About 3ms win!!! Printing from SD-card Extruder on 65-66ms Extruder + bed on 65-66ms // About 1ms win!!!

Pre-calculate strings. Update upper and lower half separate. Draw progress bar only when printing from SD / Alter SD symbol when SD-card is inserted. Replace the inverse bar in the middle with boundary lines Replaced the big heater graphic with small graphics for the single devices and draw only what is needed.

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

Der Sketch verwendet 108.058 Bytes (42%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.944 Bytes (60%) des dynamischen Speichers, 3.248 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. SD-card out Fresh reset 53-54ms Homed 57-58ms Fan100% 58-59ms Extruder on 58-59ms Extruder + bed on 59-60ms // About 2ms win!!!

define PAGE_HEIGHT 16 //256 byte framebuffer

//#define PAGE_HEIGHT 32 //512 byte framebuffer Pre-calculate strings. Update upper and lower half separate. Draw progress bar only when printing from SD / Alter SD symbol when SD-card is inserted. Replace the inverse bar in the middle with boundary lines Replaced the big heater graphic with small graphics for the single devices and draw only what is needed.

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

Der Sketch verwendet 108.056 Bytes (42%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.688 Bytes (57%) des dynamischen Speichers, 3.504 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. SD-card out Fresh reset 60-61ms Homed 64-65ms Fan100% 64-65ms Extruder on 64-65ms Extruder + bed on 65-66ms //was before Fresh reset 89ms Homed 95-96ms Fan100% 96-97ms Extruder on 97ms Extruder + bed on 98-99ms // 4 stripes. 3*stripes + 54 ~ time in ms

define PAGE_HEIGHT 8 //128 byte framebuffer

//#define PAGE_HEIGHT 32 //512 byte framebuffer Pre-calculate strings. Update upper and lower half separate. Draw progress bar only when printing from SD / Alter SD symbol when SD-card is inserted. Replace the inverse bar in the middle with boundary lines Replaced the big heater graphic with small graphics for the single devices and draw only what is needed.

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

Der Sketch verwendet 108.042 Bytes (42%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.560 Bytes (55%) des dynamischen Speichers, 3.632 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. SD-card out Fresh reset 71-72ms Homed 76ms Fan100% 78ms Extruder on 78ms Extruder + bed on 78-79ms //was before Fresh reset 111-112ms Homed 120-121ms Fan100% 123ms Extruder on 124-125ms Extruder + bed on 125-126ms // thats about 50% faster for 8 stripes. 3.25*stripes + 53 ~ time in ms

Replaced our itostr ftostr with derivates of itoa and dtostrf Pre-calculate strings. Update upper and lower half separate. Draw progress bar only when printing from SD / Alter SD symbol when SD-card is inserted. Replace the inverse bar in the middle with boundary lines Replaced the big heater graphic with small graphics for the single devices and draw only what is needed.

define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

Der Sketch verwendet 107.806 Bytes (42%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.996 Bytes (60%) des dynamischen Speichers, 3.196 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. SD-card out Fresh reset 53-54ms Homed 54-55ms Fan100% 55-56ms Extruder on 55-56ms Extruder + bed on 56-57ms // About 3ms win!!! //Was: Der Sketch verwendet 107.810 Bytes (42%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.889 Bytes (59%) des dynamischen Speichers, 3.303 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 76-77ms Homed 81ms Fan100% 82ms Extruder on 83ms Extruder + bed on 84ms // About 27ms win - ~33% win. About 4bytes progmem win. About 107byte RAM lost.

Replaced our itostr ftostr with derivates of itoa and dtostrf Pre-calculate strings. Update upper and lower half separate. Draw progress bar only when printing from SD / Alter SD symbol when SD-card is inserted. Replace the inverse bar in the middle with boundary lines Replaced the big heater graphic with small graphics for the single devices and draw only what is needed.

define REPRAP_DISCOUNT_SMART_CONTROLLER

define TEMP_SENSOR_BED 1

define SDSUPPORT

Der Sketch verwendet 96.868 Bytes (38%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.444 Bytes (54%) des dynamischen Speichers, 3.748 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. SD-card out Fresh reset 25-26ms Homed 27-28ms Fan100% 27-28ms Extruder on 27-28ms Extruder + bed on 27-28ms // Was: Der Sketch verwendet 97.138 Bytes (38%) des Programmspeicherplatzes. Das Maximum sind 253.952 Bytes. Globale Variablen verwenden 4.392 Bytes (53%) des dynamischen Speichers, 3.800 Bytes für lokale Variablen verbleiben. Das Maximum sind 8.192 Bytes. Fresh reset 25-26ms Homed 26-27ms Extruder on 26-27ms Extruder + bed on 26-27ms

// About <1ms loss. About 270bytes progmem saved. About 52byte RAM lost.

tkurbad commented 8 years ago

@AnHardt: I adapted your code to my Deltaprintr branch of the current Marlin RC. And what shall I say: The printer suddenly runs smoothly even at speeds beyond 80 mm/s.

Thank you very much for this extremely valueable improvement!

AnHardt commented 8 years ago

@tkurbad Thanks for your feedback. May i ask what kind of display you are using?

tkurbad commented 8 years ago

@AnHardt It's a full graphic display with uSD slot and rotary encoder, very similar to The MaKrPanel.

With the default firmware (an early fork of Marlin with FSR-based bed leveling code by @jcrocholl) some blobbing occured while printing with the status screen on at speeds > 30 mm/s.

After adapting Johan's FSR bed leveling code to the newest Marlin RC, I had to realize that the steppers even stuttered during simple homing operations (not due to Johan's code but thanks to the more demanding new Marlin version) - which even made the FSR leveling impossible because of vibrations added by the stuttering.

After incorporating the changes of your branch and adding a little hardware helper to simulate a FIX_MOUNTED_PROBE during FSR bed leveling, everything's running fine now and I'm finally satisfied with the overall performance of the printer.

AnHardt commented 8 years ago

Ah thanks. ST7565 was one of those i have not to test with. I just handled it analogous to other displays i had at hand.

Did you do the port commit by commit or all at once. Especially i'd be interested in, if you could say, if the general speedup, or the last step, the better distribution of the display update gave the boost for your machine.

tkurbad commented 8 years ago

Unfortunately, I cannot tell, because I ported it all at once. But, judging from my previous experiences with the display, which becomes the more sluggish the bigger a single drawing operation becomes, I'd say that splitting up the bitmap in the upper half into smaller images and precalculating the strings alone would have given a huge boost in performance already. Anyway, I cannot say for sure...

tkurbad commented 8 years ago

@AnHardt Sorry for hijacking this PR.

I tried to merge the speedup into 1.1.0-RC6. Everything seems to work, but I'm not quite sure if I did the conversion to the new LCDViewAction enum (which is used to instantiate lcdDrawUpdate in ultralcd.cpp) right - or better to say in a way that produces the most efficient LCD output. In several places things like lcdDrawUpdate-- got replaced by switch-case statements.

If you find the time, can you please have a brief look at https://github.com/tkurbad/Marlin/tree/mergetest2 to see, if I got it at least marginally right?

Thank you very much in advance!

AnHardt commented 8 years ago

@tkurbad Sorry at the moment i have low to now time to look at this. One day i'll understand in depth what thinkyhead did and than will rework this PR. When, one day, 1.1 is ready this will have a higher priority to me, since the is no chance for merging this into the main branch today, or the very near future.

tkurbad commented 8 years ago

@AnHardt I perfectly understand your reasoning. Nonetheless if you don't mind, I'll try to keep your changes in sync with the progress of 1.1 RC for use in my fork of Marlin. So far it's running pretty smooth...

AnHardt commented 8 years ago

@tkurbad I don't mind. That's what open source is about.

AnHardt commented 7 years ago

The most important ideas from here are now in Marlins RCBugFix.

AnHardt commented 7 years ago

I'll keep the branch here, to save the separated heater graphics.

AnHardt commented 7 years ago

You can now find the original graphics from here, plus a lot of additional suggestions in https://github.com/MarlinFirmware/Marlin/pull/5430#issuecomment-267124027 and following messages.