Lite XL

687 Members
Talk about the Lite XL text editor | https://github.com/lite-xl/lite-xl | Other rooms: #lite-xl-feature-requests:matrix.org, #lite-xl-offtopic:matrix.org, #lite-xl-plugin-showcase:matrix.org, #lite-xl-plugins-qa:matrix.org, #lite-xl-technical-questions:matrix.org6 Servers

Load older messages

27 Nov 2022
@_discord_373409581973504000:t2bot.iorealtakase never 22:28:03
@_discord_243019821564952578:t2bot.ioJan How lucky that posix has a thing for that :P 22:28:30
@_discord_373409581973504000:t2bot.iorealtakase lite-xl doesn't have anything more advanced than stdio's api aside from whatever functions we happen to extend in system 22:28:41
@_discord_243019821564952578:t2bot.ioJan well, maybe it should 22:29:06
@_discord_373409581973504000:t2bot.iorealtakase for size checking, its probably possible to use trunc 22:29:10
@_discord_373409581973504000:t2bot.iorealtakase well maybe while we're at it moving most of the fs functions into its own module for sanity 22:29:39
@_discord_144622832704290817:t2bot.ioGuldoman before that we should not overwrite the file directly 22:29:41
@_discord_243019821564952578:t2bot.ioJan it depends 22:29:54
@_discord_243019821564952578:t2bot.ioJan I agree that simply overwriting the file is dirty and could leave damaged files if the program has a problem during it 22:30:18
@_discord_243019821564952578:t2bot.ioJan but putting the file into a temporary location before moving it into the correct place double the size requirements 22:30:45
@_discord_144622832704290817:t2bot.ioGuldoman which for a text editor is fine 22:31:03
@_discord_373409581973504000:t2bot.iorealtakase maybe not do that after a threshold? 22:31:03
@_discord_243019821564952578:t2bot.ioJan I guess so 22:31:10
@_discord_243019821564952578:t2bot.ioJan another option would be writing in-place 22:31:22
@_discord_243019821564952578:t2bot.ioJan idk, we'll see 22:31:46
@_discord_243019821564952578:t2bot.ioJan my first goal will be improving memory consumption for bigger files 22:31:59
@_discord_144622832704290817:t2bot.ioGuldoman the only thing that bloats things is the tokenizer keeping every single string token saved 22:32:41
@_discord_144622832704290817:t2bot.ioGuldoman replacing each token string with two ints (start, end) would improve memory 22:33:45
@_discord_144622832704290817:t2bot.ioGuldoman * replacing each token string with two ints (start, end) would improve memory consumption 22:33:54
@_discord_144622832704290817:t2bot.ioGuldoman then extracting the token string when needed from the two ints 22:34:17
@_discord_144622832704290817:t2bot.ioGuldoman shouldn't be too demanding 22:34:26
@_discord_144622832704290817:t2bot.ioGuldoman hopefully 22:34:28
@_discord_373409581973504000:t2bot.iorealtakase strings are still interned, you'd still end up with chunks of string either way unless the tokenizer has direct access to string and doesn't pass back to renderer through lua 22:35:46
@_discord_144622832704290817:t2bot.ioGuldoman what do you mean 22:36:16
@_discord_144622832704290817:t2bot.ioGuldoman at the moment each single string token is saved 22:36:30
@_discord_144622832704290817:t2bot.ioGuldoman while lua dedupes them, in big files this adds up a lot 22:36:53
@_discord_144622832704290817:t2bot.ioGuldoman highlighter keeps the original text line (which shouldn't increase memory consumption as it's a copy of the one in doc) 22:37:45
@_discord_144622832704290817:t2bot.ioGuldoman so the tokenizer function should return only two numbers for each token instead of the partial string 22:38:20
@_discord_144622832704290817:t2bot.ioGuldoman extracting the strings on demand means that we don't keep them 22:38:57
28 Nov 2022
@daeraxa:matrix.orgdaeraxa joined the room.03:06:24

There are no newer messages yet.

Back to Room List