Commit graph

15 commits

Author SHA1 Message Date
turleypol
24c8c8b92f
Tidy modernize for loops (#862)
* trigger loop convert

* Automated clang-tidy change: modernize-loop-convert

* fixed refactor

* Automated clang-tidy change: modernize-loop-convert

* compile

* first look through

* fixes and start to use a few ranges

* revert autogenerated file

* compilation fix

* second pass

* renamed loop variable

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-31 09:14:02 +01:00
turleypol
21577d8e5b
Clang Tidy concat namespaces (#855)
* tidy

* Automated clang-tidy change: modernize-concat-nested-namespaces

* compile test

* fix namespace

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-17 10:30:21 +01:00
turleypol
8e9a044776
WorldSave performance (#753)
* directly write to stream

* quickfix just disabled orphan console print

* now?

* debug timer for each file

* removed pointer indirection
use defined underlying buffer size
reactivated orphans

* missing files

* optimized away dynamic allocations during formatting by using buffer

* debug print thread id used
stop timer of blocking part

* wake up all threads, if the producer thread is faster only one thread
will wake up...
extended debug logging

* after reading the standard...
notify_* is atomic thus multiple calls to notify_one will always wake up
a different thread.
So notify_one is correct here and notify_all pessimistic

* increased the buffer
ordered savefiles roughly by size

* use compile time strings to optimize formatting
added a few shortcuts
optimized hexint by adding a string_view version with threadlocal buffer

* cleanup

* readded terminate protection

* docs

* StreamWriter needs to be destroyed before printing the stream
2025-01-29 06:48:05 +01:00
turleypol
c046da4d5a
Moved target/menu members from char to ClientGameData, simplified memory size estimation (#668)
* moved more members from Character to ClientGameData
reordered a few members to reduce padding
added memsize functions for std containers to simplify code

* few more comments
2024-07-28 10:42:47 +02:00
turleypol
08bd3c7ce5
Savefile rewrite (#601)
* rewrite of saving, replaced operator way with a generic add method, thus
not everywhere the formating of the savefiles is hardcoded.
since its the last spot which uses the old formating lib, remobed the
lib

* removed cmake of old format lib

* testscripts for load/save of UObject,Item,Armor,Weapon

* fixed: member faster_cast_recovery and faster_cast_recovery_mod getter returned
a wrong value

* wrong/missing docs

* test containers, lockable, map, spellbooks
fixed save bug in map and spellbook
removed ancient savestrategy experiments

* added corpse test
splitted testfiles

* fixed loading (ancient bug) and saving (PR bug) of Reportables
added tests for houses, boats, accounts and chars

* fixed include

* fix shutdown leak

* added npc tests
upload complete coretest folder also on failure

* do not write and load RegisteredHouse for NPCs two times
readded extra newline between accounts

* tests for guild, party, realm
added resource cfgs, but a test is not really possible since nothing of
interest is stored

* added datafile, storage test

* activated resource loading, 25year old bug, but since the stored values
are senseless it makes no real difference.
added a few wtf comments
catch all exceptions during formatting of log lines

* replaced .write with explixit .begin, .end and .comment.
for leftovers.txt the StreamSaver was also used, since the format is
different use directly ofstream

* added corechanges
2024-01-24 18:49:06 +01:00
turleypol
f99ab2dbaf
switched internals of realms, changed packetdefs (#432)
* switched internals of realms, changed packetdefs

* restructured ListenPoint a bit

* moved actual listenpt code to private method

* simplified listenptr loop and the same for guilds to fix ancient fixme

* added todo for future us
2021-10-26 10:52:13 +02:00
Kevin Eady
b0747f5b93 add Guild::get_members() 2020-03-22 20:13:21 +01:00
esdete
dc2d29b433 NULL to nullptr 2018-07-31 14:30:29 +02:00
turleypol
dbb25bdb62
Include and buildsystem cleanup (#45)
Include cleanup
Reworked buildsystem (Linux only)
Removed dynamic libs, Linux now again uses static linking (like windows)
2018-01-29 21:55:48 +01:00
turley
189cad3479 Formating everything
Authors are not forced to use the clang-format setting, but should
atleast be inspired by the style.
The only thing which is now not allowed are tabs for ident/alignment!
2016-02-19 19:26:35 +01:00
Gabriele Tozzi
53c2ba78c6 Added: CProp profiler, helps detecting unused CProps
It can be enabled by using the new pol.cfg option "ProfileCProps".
For better results, should be enabled before startup.
Impacts on performance very slightly, but consumes an average of
300 bytes of extra RAM for every CProp used.
New polsys.em function LogCPropProfile() can be called to dump
the profiling information into cpprofile.log.
2016-01-31 15:06:56 +01:00
turley
7a531357fe Updated Memoryusage profiler 2015-01-19 18:18:21 +01:00
turley
79dff37246 Splitted gamestate external. 2015-01-02 14:46:44 +01:00
muaddib_pol
49072c3c41 + To-Do file updates
+ Beginning of Mobile and Module source file organization
+ Makefile.Gcc updates
2009-09-06 14:11:24 +00:00
muaddib_pol
d032ee448f + POL is now, open source. 2009-09-03 19:44:42 +00:00