Shock95 / AuctionHouse

Feature-packed auction house plugin for PocketMine-MP (pmmp)
GNU General Public License v3.0
43 stars 34 forks source link

high pct tick #47

Closed rjworks closed 4 years ago

rjworks commented 4 years ago
AuctionHouse v1.2.0-PRERELEASETotal: 1.782 s Pct: 0.12%
   Pct Total    Pct Tick       Total          Avg    PerTick         Count      Event
       0.04%       0.04%      0.63 s         0.02 ms      26         809.5k     shock95x\auctionhouse\libs\muqsit\invmenu\InvMenuEventHandler::onDataPacketReceive(DataPacketReceiveEvent)
       0.04%     246.24%      0.62 s       123.12 ms     0.0           0.0k     Task: shock95x\auctionhouse\task\ListingExpireTask(interval 6000)
       0.03%       0.03%      0.50 s         0.02 ms      25         754.4k     shock95x\auctionhouse\libs\CortexPE\Commando\PacketHooker::onPacketSend(DataPacketSendEvent)
       0.00%       0.16%      0.04 s         0.08 ms     0.0           0.5k     shock95x\auctionhouse\libs\muqsit\invmenu\InvMenuEventHandler::onInventoryTransaction(InventoryTransactionEvent)
       0.00%       0.12%      0.00 s         0.06 ms     0.0           0.0k     shock95x\auctionhouse\libs\muqsit\invmenu\InvMenuEventHandler::onPlayerJoin(PlayerJoinEvent)
       0.00%       0.00%      0.00 s         0.00 ms     0.0           0.2k     shock95x\auctionhouse\EventListener::onInventoryClose(InventoryCloseEvent)
       0.00%       0.47%      0.00 s         0.24 ms     0.0           0.0k     Task: shock95x\auctionhouse\task\MenuDelayTask(Single)
       0.00%       0.01%      0.00 s         0.00 ms     0.0           0.0k     shock95x\auctionhouse\libs\muqsit\invmenu\InvMenuEventHandler::onPlayerQuit(PlayerQuitEvent)
rjworks commented 4 years ago

the interval for this task is currently 5 mins. will anything break if i change it to 50 mins?

Shock95 commented 4 years ago

If you're confident that the server won't crash anytime then sure, but I already made optimizations and might push them soon

rjworks commented 4 years ago

im not confident

can u make push that

Shock95 commented 4 years ago

I'm waiting for recursive inventories get fixed in InvMenu, until then I could use a delayed task to send menus as a workaround but it might not work all the time so I'm not sure.

Shock95 commented 4 years ago

I currently have a workaround that seems to work, if it doesn't break and everything else works fine I'll push it today

rjworks commented 4 years ago

does it break

Shock95 commented 4 years ago

Everything seems to be fine, I pushed a release an hour ago

rjworks commented 4 years ago

should i use that i current have it the task every 55mins

Shock95 commented 4 years ago

I made optimizations in other areas besides the task so yeah

rjworks commented 4 years ago

oh ok will it no longer be 200+% pct tick then

Shock95 commented 4 years ago

The timings seemed to be good when I tested it, you can try it and check the results just to make sure

rjworks commented 4 years ago

why when i download 1.2 branch i get something else something else not what i see in the 1.2 page.

rjworks commented 4 years ago

there is also no commando in virions:.

Shock95 commented 4 years ago

Are you downloading from the releases tab?

rjworks commented 4 years ago

ok that fixed it thanks a lot good job keep it up

rjworks commented 3 years ago

the pct tick improved a lot what did u do?

Shock95 commented 3 years ago

thanks, you can look at the description and changes here: https://github.com/Shock95x/AuctionHouse/commit/ae18be6df964b0769fcf1c20a2d3f3ed580c1fb1

I pretty much went over the plugin and checked everything I was able to optimize, even the small things

rjworks commented 3 years ago

- DB is now updated when a listing is created or expired is this not resource extensive?

rjworks commented 3 years ago

if not, i think i want to do that for my plugin too to save stats when the player leaves instead of all player at once every other time.

Shock95 commented 3 years ago

- DB is now updated when a listing is created or expired is this not resource extensive?

Not necessarily since I don't think listings would be created that often and the DB lib is async too, it would actually be better in case of a fatal server crash

rjworks commented 3 years ago

- DB is now updated when a listing is created or expired is this not resource extensive?

Not necessarily since I don't think listings would be created that often and the DB lib is async too, it would actually be better in case of a fatal server crash

everything in libasynql is async right including update

Shock95 commented 3 years ago

- DB is now updated when a listing is created or expired is this not resource extensive?

Not necessarily since I don't think listings would be created that often and the DB lib is async too, it would actually be better in case of a fatal server crash

everything in libasynql is async right including update

yes

rjworks commented 3 years ago

- DB is now updated when a listing is created or expired is this not resource extensive?

Not necessarily since I don't think listings would be created that often and the DB lib is async too, it would actually be better in case of a fatal server crash

everything in libasynql is async right including update

yes

do you think it would be a bad idea to save stats ;like kills and deaths to SQLite every time the player leaves?