Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Store message list in context to improve performance#103

Closed
Athozus wants to merge 1 commit intomasterfrom
messages-context
Closed

Store message list in context to improve performance#103
Athozus wants to merge 1 commit intomasterfrom
messages-context

Conversation

@Athozus
Copy link
Member

@Athozus Athozus commented Jun 18, 2023

I put that into WIP because I'm pretty sure there are many things to improve.

  • They are deleted after closing formspec
  • The json file is called only once
  • It is regenerated after delete/restore/new message

I made a mail.message_context variable, following the concept of selected_idxs. I noticed small improvements while selecting messages in a big inbox, but let see (I did that with 2k messages instead of 4k the last time, cause it's too long).

To help you having better view of what I mean, you can add the following command from whosit :

local mail_spam = function(playername, param)
    local number = tonumber(param)
    if not number then
        number = 10
    end
    for i = 0, number do
        local success, err = mail.send({
                from = "singleplayer",
                to = playername,
                cc = "",
                bcc = "",
                subject = string.format("subject line %04d", i),
                body = "mail body test test"
        })
    end
end


minetest.register_chatcommand("mail_spam", {
    params = "",
    description = "Spam a mailbox of user with mails",
    privs = { server = true },
    func = mail_spam
})

They are deleted after closing formspec, and the json file is called only once
@Athozus Athozus added the WIP label Jun 18, 2023
@Athozus Athozus added this to the 1.2.0 milestone Jun 18, 2023
@BuckarooBanzay
Copy link
Member

BuckarooBanzay commented Jun 19, 2023

i have a few ideas how to significantly improve the overall performace of mail.get_storage_entry and mail.set_storage_entry if that's the bottleneck

@Athozus
Copy link
Member Author

Athozus commented Jun 19, 2023

Then tell us, I'm interested.

@BuckarooBanzay
Copy link
Member

Then tell us, I'm interested.

👉 #104

@Athozus
Copy link
Member Author

Athozus commented Jun 19, 2023

@BuckarooBanzay @S-S-X continue work or close (as #104 already done huge improvements) ?

@Athozus Athozus force-pushed the master branch 2 times, most recently from 170199b to f5198b9 Compare June 20, 2023 14:04
@Athozus Athozus marked this pull request as draft June 20, 2023 14:11
@Athozus
Copy link
Member Author

Athozus commented Jun 20, 2023

Unneeded, after the improvements of #104.

@Athozus Athozus closed this Jun 20, 2023
@Athozus Athozus added the Performance Related to performance improvement (lag issues) label Jun 20, 2023
@Athozus Athozus removed this from the 1.2.0 milestone Jul 19, 2023
@Athozus Athozus added this to the 1.2.0 milestone Jul 27, 2023
@Athozus Athozus deleted the messages-context branch April 15, 2024 15:24
@Athozus Athozus restored the messages-context branch April 15, 2024 15:24
@Athozus Athozus deleted the messages-context branch April 15, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Performance Related to performance improvement (lag issues) WIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants