From db264d006557f9da752ebc304aa913b16d846478 Mon Sep 17 00:00:00 2001 From: cy384 Date: Fri, 24 Jul 2020 14:47:07 -0400 Subject: [PATCH] performance improvements --- CMakeLists.txt | 3 +++ README.md | 4 ++-- ssheven.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ec9c8b..0f48c9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,8 +4,11 @@ add_application(ssheven CREATOR "SSH7" ssheven.c ssheven-console.c ssheven.r) set_target_properties(ssheven PROPERTIES COMPILE_OPTIONS -ffunction-sections) +add_compile_options(-O2) + IF(CMAKE_SYSTEM_NAME MATCHES Retro68) # for 68k +add_compile_options(-march=68020) set_target_properties(ssheven PROPERTIES LINK_FLAGS "-Wl,-gc-sections -Wl,--mac-segments -Wl,${CMAKE_CURRENT_SOURCE_DIR}/ssheven.segmap") target_link_libraries(ssheven ssh2 mbedtls mbedx509 mbedcrypto OpenTransportApp OpenTransport OpenTptInet) ELSE() diff --git a/README.md b/README.md index c46f5e1..0b82eae 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ Project status: as of 0.1.0 (see github releases), an actual SSH client, with a system requirements ------------------- -* CPU: minimum m68k processor TBD, any PPC processor should be fast enough -* RAM: requires around 1MB, exact value TBD (adjust up via the info box if it crashes) +* CPU: at least a 68020, which may still be too slow. Any PPC processor should be fast enough! +* RAM: requires approx 2MB (adjust up via the info box if it crashes) * Disk space: currently about 1MB for the fat binary, or about 600KB for one platform * System 7.5 recommended, earlier System 7 versions possible with the Thread Manager extension installed * Open Transport networking required, version 1.1.1 recommended minimum diff --git a/ssheven.c b/ssheven.c index 4f3206b..ddc1bc7 100644 --- a/ssheven.c +++ b/ssheven.c @@ -193,7 +193,7 @@ void event_loop(void) // maximum length of time to sleep (in ticks) // GetCaretTime gets the number of ticks between caret on/off time - long int sleep_time = GetCaretTime(); + long int sleep_time = GetCaretTime() / 4; do {