Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Extreme lag when using Lich

  1. #1

    Default Extreme lag when using Lich

    Hello friends,

    I started playing again about a month ago. Since then, whenever using Stormfront + Lich, I'm experiencing some pretty gnarly lag that's starting to negatively impact my hunts. Sometimes it's definitely client-side, with stuttering/pauses when typing commands into the text prompt (but before hitting enter). Other times, there's a delay on new messages/strings coming into my screen. For instance, when running a ;go2 command, I'll see narost update my characters significantly faster than the text coming into the screen, with upwards of a 5 second delay before my client catches up. When entering commands, sometimes there's a significantly delay between it registering with the client and the result outputting to the Story terminal.

    Here's my version.lic:
    Code:
    !>;version
    --- Lich: version active.
    Ruby version........: 2.6.6
    Ruby platform.......: i386-mingw32
    Ruby engine.........: ruby
    Lich version........: 5.2.1
    SQLite3 version.....: 1.4.2
    Gtk version.........: 3.24.24
    Cairo version.......: 1.17.4
    ;version Version....: 0.53
    
    LICH_DIR............: C:/Users/Akaylas/Desktop/Lich5
    SCRIPT_DIR..........: C:/Users/Akaylas/Desktop/Lich5/scripts
    DATA_DIR............: C:/Users/Akaylas/Desktop/Lich5/data
    TEMP_DIR............: C:/Users/Akaylas/Desktop/Lich5/temp
    LOG_DIR.............: C:/Users/Akaylas/Desktop/Lich5/logs
    MAP_DIR.............: C:/Users/Akaylas/Desktop/Lich5/maps
    BACKUP_DIR..........: C:/Users/Akaylas/Desktop/Lich5/backup
    Ruby location.......: C:/Ruby4Lich5/bin/rubyw.exe
    
    MapDB filename................: map-1640458453.json
    MapDB last modified...........: 2021-12-26 14:20:50 -0500
    gameobj-data last modified....: 2021-12-15 01:44:33 -0500
    spell-list last modified......: 2021-12-15 01:44:32 -0500
    
    Running scripts.....: infomon, lnet, linktothefast, containers, uberbarv_d, uberspells, roomcreature, spellcaster, recolor, reverb, no-pronoun-links, sorter, rnum3, prettiernum, version
    Downstream hooks....: inventory_boxes_off, fix_gameobj_status, lnet-watch-forage, recolor_room_hook, no-pronoun-links, SLootGameObjWatcher, sorter, rnum3, prettynumber
    Upstream hooks......: inventory_boxes_toggle, infomon, alias-service, lnet, containers, #{Script.current.name}_upstream_hook, recolor_room_hook, reverb::upstream
    Current threads.....: 27
    I'm not running anything crazy, but I'm sometimes wrecked by 10+ seconds of lag while hunting, resulting in me being unable to defend myself. There's no clear correlation on when this happens or what. I'm on a pretty good Windows 10 PC with 8-core 3.6GHz, 16 GB ram; my CPU doesn't really go beyond 40% utilization and I don't really use more than 10gb of ram at a time. That being said, I should be able to run Gemstone + Lich with 500mb free and even a fraction of a single core. I can play lots of other games, both 3d-accelerated and not, fine with no lag, stuttering etc.

    I'm pretty good with computers, so any suggestings on fixing, triaging or investigating this would be helpful. If it's helpful, I can post a video of a hunt and show what happens. tia~
    Last edited by Akaylas; 12-26-2021 at 09:32 PM.
    "Fleurs suddenly looks very uncomfortable and as if she were scrunching every muscle in her body all at once. A high-pitched squeal of gas being released erupts from behind her as a result, though thankfully it is short and scentless."

  2. #2

    Default

    I would start by listing which scripts you're running, and then reading them to see if you have some kind of loop that is going non-stop.
    Find me in game as Alastir
    Or on Discord as: Alastir#9661

  3. #3

    Default

    what are you hunting? I usually get nailed with lag when there are a ton of things in a room that can be interacted with via StormFront's point/click

  4. #4

    Default

    Go to your Lich folder, then Data folder, and see how big is your lich.db3 file?

    I used to have a problem similar to what you're having and it was because my lich.db3 file grew extremely large, over 160MB.

    It's not a common problem but it's a possibility depending on the types of scripts you have been running.

  5. #5

    Default

    Quote Originally Posted by Alastir View Post
    I would start by listing which scripts you're running, and then reading them to see if you have some kind of loop that is going non-stop.
    The list is in the version.lic outpout, but I'm not running anything too obscure, and I was hoping to avoid reading 10+kloc to figure out what's going on. I killed everything and I'm still getting input stutters. I'll try hunting but I've been getting v. lucky with gem bounties tonight.

    Quote Originally Posted by dzulthu View Post
    what are you hunting? I usually get nailed with lag when there are a ton of things in a room that can be interacted with via StormFront's point/click
    Nelemar, top floor. I pre-emptively turned off interactive links with LostRanger's LinkToTheFast (keeps the highlights, disables the interactivity). But I can experience these lag spikes with even a single monster in the room that I disable before it can do anything.
    "Fleurs suddenly looks very uncomfortable and as if she were scrunching every muscle in her body all at once. A high-pitched squeal of gas being released erupts from behind her as a result, though thankfully it is short and scentless."

  6. #6

    Default

    Quote Originally Posted by Tgo01 View Post
    Go to your Lich folder, then Data folder, and see how big is your lich.db3 file?

    I used to have a problem similar to what you're having and it was because my lich.db3 file grew extremely large, over 160MB.

    It's not a common problem but it's a possibility depending on the types of scripts you have been running.
    184kb, but this is good to know. Thanks.

    Code:
    Akaylas@DESKTOP-GDSTAC2 MINGW64 ~/Desktop/Lich5/data
    $ ls -la lich.db3
    -rw-r--r-- 1 Akaylas 197121 188416 Dec 26 20:25 lich.db3
    Last edited by Akaylas; 12-26-2021 at 09:32 PM.
    "Fleurs suddenly looks very uncomfortable and as if she were scrunching every muscle in her body all at once. A high-pitched squeal of gas being released erupts from behind her as a result, though thankfully it is short and scentless."

  7. #7

    Default

    Looking at all the hooks you are running, you have quite a few scripts which are trying to do something with every piece of stream info you are are sent.

    Try pairing down those scripts and uberbar and see if that improves
    I don't want the world; I just want your half.
    Discord BigNasty#8519

  8. #8

    Default

    Quote Originally Posted by Rinualdo View Post
    Looking at all the hooks you are running, you have quite a few scripts which are trying to do something with every piece of stream info you are are sent.

    Try pairing down those scripts and uberbar and see if that improves
    This was the hunch I had. If each script has to inspect each line of input, transform it, and pass it to the next script, and the game itself is blocking on that input, it's going to slow everything down. But that seems like an innate limitation of Lich and the nature of the game.

    Does everyone just try to keep those kinds of scripts limited?
    "Fleurs suddenly looks very uncomfortable and as if she were scrunching every muscle in her body all at once. A high-pitched squeal of gas being released erupts from behind her as a result, though thankfully it is short and scentless."

  9. #9

    Default

    Quote Originally Posted by Akaylas View Post
    This was the hunch I had. If each script has to inspect each line of input, transform it, and pass it to the next script, and the game itself is blocking on that input, it's going to slow everything down. But that seems like an innate limitation of Lich and the nature of the game.

    Does everyone just try to keep those kinds of scripts limited?
    I think it really depends on what those scripts are doing with the game lines. If it's simply taking a game line and changing the wording around a bit it probably wouldn't affect much at all. If it's taking each game line and doing a hundred different things behind the scenes before spitting the game line back out then it might cause some problems, especially if multiple scripts are doing this.

    I'm pretty sure I used to run around with more downstream and upstream hooks and never noticed a problem.

  10. #10

    Default

    Quote Originally Posted by Tgo01 View Post
    I think it really depends on what those scripts are doing with the game lines. If it's simply taking a game line and changing the wording around a bit it probably wouldn't affect much at all. If it's taking each game line and doing a hundred different things behind the scenes before spitting the game line back out then it might cause some problems, especially if multiple scripts are doing this.

    I'm pretty sure I used to run around with more downstream and upstream hooks and never noticed a problem.
    Intuitively, as long as they're not crazy bad, it doesn't seem like a pipeline of string manipulations should cause much problem. Is there a, uhh, definitive guide to the architecture behind Lich? Or has anyone experimented with hooking up a profiler to the Ruby process/threads so that I can see where whatever latency is coming from? I've got the software chops, but Ruby isn't something I've worked in extensively.
    "Fleurs suddenly looks very uncomfortable and as if she were scrunching every muscle in her body all at once. A high-pitched squeal of gas being released erupts from behind her as a result, though thankfully it is short and scentless."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •