IRC logs for #openttd on OFTC at 2019-08-07
            
00:07:13 *** D-HUND is now known as debdog
00:11:03 *** Samu has quit IRC
00:30:01 *** Wolf01 has quit IRC
00:32:22 *** arikover has quit IRC
01:04:01 *** HerzogDeXtEr has quit IRC
01:34:49 *** snail_UES_ has joined #openttd
01:44:36 *** rocky11384497 has joined #openttd
01:49:07 *** snail_UES_ has quit IRC
02:08:59 *** Wormnest has quit IRC
02:47:38 <DorpsGek_II> [OpenTTD/website] James103 opened issue #98: NET::ERR_CERT_DATE_INVALID when accessing https://wiki.openttdcoop.org https://git.io/fjQzV
03:12:08 *** Wormnest has joined #openttd
03:54:29 *** Wormnest has quit IRC
03:58:53 *** Flygon has joined #openttd
04:32:16 <DorpsGek_II> [OpenTTD/website] Eddi-z commented on issue #98: NET::ERR_CERT_DATE_INVALID when accessing https://wiki.openttdcoop.org https://git.io/fjQg1
04:41:37 *** glx has quit IRC
04:45:14 *** D-HUND has joined #openttd
04:48:36 *** debdog has quit IRC
05:42:45 *** Smedles has quit IRC
05:43:59 *** Smedles has joined #openttd
05:47:31 *** Thedarkb-X40 has quit IRC
06:26:56 *** Wormnest has joined #openttd
07:34:03 <DorpsGek_II> [OpenTTD/OpenTTD] andythenorth approved pull request #7686: Fix: Spelling in running costs help text https://git.io/fjQag
08:03:39 *** cHawk has quit IRC
08:31:06 *** Samu has joined #openttd
08:31:18 <Samu> hi
08:31:31 <Samu> town coverage doesn't work well on sub-tropic
08:31:42 <Samu> unless the buildings are invisible
08:31:57 <Samu> it doesn't show the red squares
09:04:54 <Samu> How do I get the cargo production of a specified coverage area which is not a rectangle?
09:05:28 <Samu> cargo production around a multi-tile station
09:05:46 <Samu> cargo waiting doesn't cut it for me
10:16:02 *** cHawk has joined #openttd
11:09:34 <Samu> how do I get cargo production of a tile
11:09:48 <Samu> i can only get cargo production around a tile :)
11:11:18 <Samu> if i have multiple tiles around, they overlap, I can't reliably get the production
11:13:44 <Samu> must do some tile gimnastic here to get what i want
12:10:38 *** Thedarkb-X40 has joined #openttd
12:27:31 *** Thedarkb-X40 has quit IRC
12:37:09 *** Thedarkb-X40 has joined #openttd
13:07:59 *** Thedarkb-X40 has quit IRC
13:11:09 *** Thedarkb-X40 has joined #openttd
13:27:11 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh merged pull request #7686: Fix: Spelling in running costs help text https://git.io/fjQBI
14:12:20 *** Beerbelott has joined #openttd
14:12:55 <Beerbelott> The latest nightly changelog.txt is blank https://proxy.binaries.openttd.org/openttd-nightlies/20190806-master-g9fd91f9b69/changelog.txt Is this expected?
14:13:04 <Beerbelott> 0b content
14:13:15 <Beerbelott> HTTP 200
14:16:41 <LordAro> it's known broken, yes
14:21:12 <Samu> help https://paste.openttdcoop.org/pkbdlajme
14:23:56 <Samu> https://imgur.com/undefined
14:24:08 <Samu> lol undefined?
14:24:26 <Samu> https://imgur.com/u87HSar
14:34:28 <Beerbelott> LordAro: Perfect, thx
14:36:48 *** Beerbelott has left #openttd
14:56:59 <milek7> Samu: well, what have you wanted to test? ;P
14:57:00 <milek7> https://i.imgur.com/6eW0hNC.png
15:01:34 <Samu> woah, it can only list 15 ais?
15:02:46 <Samu> the good way to test was to set max ops to a big number
15:02:59 <Samu> 250000
15:03:12 <Samu> then see how it adjusts
15:04:22 <milek7> yes, performance timer currently counts first 15 ais
15:05:01 <Samu> im not even sure how it works with more than 15
15:06:11 <Samu> with only 10000 max ops, your system is too fast
15:06:21 <milek7> i rebased my more companies patch on your branch ;p
15:06:27 <LordAro> it's a hardcoded limit
15:06:31 <Samu> no adjustments are needed, so it keeps 10000 ops
15:06:35 <LordAro> if you've added more companies, you'll need to expand that as well
15:07:40 <Samu> also competitor speed plays a role too
15:08:21 <Samu> it's under settings\competitors\computer players
15:08:34 <Samu> #opcodes before scripts are suspended
15:08:35 <milek7> it needs dynamic vector of _pf_data, as extending that to constant 240 seems bit silly..
15:08:55 <Samu> and construction speed
15:09:10 <LordAro> worrying about that much extra memory usage seems a bit silly if you've got 240 companies :p
15:20:04 <Samu> if it can't log the ms times of companies 15+ i don't think that's working properly
15:21:28 *** sla_ro|master has joined #openttd
15:41:22 <milek7> Samu: https://i.imgur.com/SwLT7J3.png
15:42:04 <milek7> looks rather unfair ;p
15:44:22 <Samu> looks like.. it's not working properly, im unsure, never planned it going over 15 :o
15:44:35 <Samu> bork ai still getting 250 000
15:44:46 <Samu> with those frame times...
15:47:47 <milek7> if you want to test: https://github.com/Milek7/OpenTTD/tree/more_companies_samu
15:48:18 <milek7> it's based on old code from april because I haven't merged more_companies with NRT tile changes yet
15:48:24 <Samu> the way it should work was making it "detect" big ms times, and then force a lower number of max ops
15:49:25 <milek7> and I reverted 5699724, because it stuffs company bitmask into DoCommand int arguments (and more_companies obviously doesn't fit there)
15:50:29 *** nielsm has joined #openttd
16:07:37 *** snail_UES_ has joined #openttd
17:28:04 *** arikover has joined #openttd
17:33:00 <DorpsGek_II> [OpenTTD/OpenTTD] nikolas opened pull request #7687: Fix: typo in ScriptList::Valuate param error https://git.io/fjQMB
17:33:46 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro approved pull request #7687: Fix: typo in ScriptList::Valuate param error https://git.io/fjQM0
17:47:49 *** Flygon has quit IRC
17:59:57 <Eddi|zuHause> yay, steam scheduled an update for tomorrow 4:30AM, which is in less than 12 hours!
18:00:21 <Eddi|zuHause> and it's a whooping 2.8MB
18:02:50 <peter1139> Delightful
18:03:25 *** Samu has quit IRC
18:14:52 *** Wormnest has quit IRC
18:31:12 *** HerzogDeXtEr has joined #openttd
18:39:51 *** Samu has joined #openttd
18:41:07 *** Arveen has quit IRC
19:03:55 *** snail_UES_ has quit IRC
19:09:25 *** arikover has quit IRC
19:11:48 *** Progman has joined #openttd
19:11:53 *** frosch123 has joined #openttd
19:19:34 *** Samu has joined #openttd
19:20:40 <Samu> get cargo production is a lie
19:21:03 <Samu> it counts the number of houses around, im disappointed
19:28:53 <Samu> if (hs->population > 0) { produced[CT_PASSENGERS]++; }
19:29:03 <Samu> lol, just that? very misleading...
19:29:46 <Samu> https://github.com/OpenTTD/OpenTTD/blob/master/src/town_cmd.cpp#L672
19:36:51 <Samu> TileLoop_Town has a different measure
19:36:57 <Samu> I don't understand why
19:37:42 *** Wolf01 has joined #openttd
20:04:42 *** Samu has quit IRC
20:12:30 *** Gumle2 has joined #openttd
20:15:13 *** Wormnest has joined #openttd
20:55:05 *** andythenorth has joined #openttd
20:55:56 <andythenorth> o/
20:58:09 <andythenorth> so I bought a new laptop to see if OpenTTD is faster
21:01:19 <andythenorth> the new laptop has dumped performance from about 15-20fps to around 10fps
21:03:06 <Eddi|zuHause> ... that's because the problem is not about processor speed
21:03:35 <andythenorth> do we know that? o_O
21:03:47 <Eddi|zuHause> yes
21:03:48 <andythenorth> it's quite unreliable to reproduce
21:04:03 <nielsm> that makes it even more likely
21:04:03 <Eddi|zuHause> if it were processor speed, it would be reproducable
21:04:04 <andythenorth> what do we think the problem is?
21:04:13 <nielsm> system timers of some sort
21:04:35 <Eddi|zuHause> some sort of locking/race condition type stuff
21:04:38 <nielsm> do you have a windows or linux system on hand? if so maybe try running a dedicated server on the mac and see if performance is weird
21:04:48 <nielsm> or try running with null video
21:04:54 <andythenorth> oh I recompiled
21:04:55 <andythenorth> now it's down to 2.5 fps for the simulation
21:05:32 <Eddi|zuHause> do we allow compiling without threads?
21:06:33 <milek7> yes
21:06:40 <milek7> emscripten used that
21:07:39 <Eddi|zuHause> so you could try that
21:10:30 <andythenorth> I wonder whether I should separately bisect master against 1.9.1
21:10:33 *** glx has joined #openttd
21:10:33 *** ChanServ sets mode: +v glx
21:10:47 <andythenorth> the frame rates on 'normal' speed are ~same
21:11:07 <andythenorth> but on ffwd, 1.9.1 clips 9999fps, whereas master is in the 100-4000 range
21:11:28 <glx> on your mac ?
21:11:44 <andythenorth> yes, except I bought a new faster one to see if OpenTTD is faster
21:11:55 <andythenorth> I'm guess there are multiple issues, or multiple manifestations, which make the fps numbers hard to understand
21:12:16 <nielsm> try with different video drivers: dedicated server, null, SDL
21:12:22 <nielsm> allegro if possible
21:12:32 <nielsm> with/without threads
21:12:39 <andythenorth> I need a spreadsheet :)
21:15:56 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 merged pull request #7687: Fix: typo in ScriptList::Valuate param error https://git.io/fjQMB
21:20:12 <glx> nnyby: about #7685: indentation of comments should be restored too
21:23:51 <andythenorth> errr.
21:24:00 <andythenorth> how do I navigate the filesystem on Windows 10? :P
21:24:11 <glx> windows+E
21:24:53 <glx> in cmd or powershell you can use 'cd'
21:27:12 <andythenorth> thanks
21:32:16 <andythenorth> ok let's assume that Windows OpenTTD performance in Virtualbox is irrelevant
21:32:18 <andythenorth> :P
21:36:58 <andythenorth> so if I run with null video driver option, how am I testing fps?
21:37:12 <nielsm> andythenorth: src/video/cocoa/event.mm line 692, try changing to: if (true /*cur_ticks >= next_tick || (_fast_forward && !_pause_mode) || cur_ticks < prev_cur_ticks*/)
21:37:29 <nielsm> that would force the game into eternal fastforward and disregard any timing, I think
21:37:37 *** Arveen has joined #openttd
21:38:15 <nielsm> also line 676 is: while (QZ_PollEvent()) {}
21:38:43 <nielsm> maybe try changing that to just a single QZ_PollEvent(); call together with the eternal fast-forward
21:38:43 * andythenorth tries
21:39:47 <nielsm> and maybe try changing the GetTick() in line 691 to a constant 0 as well, to rule out whether the act of getting the current tick value is slow
21:42:32 <nielsm> then regardless of the results of those changes, revert all of that and comment out line 713: CSleep(1);
21:43:17 <andythenorth> I really need to video the result
21:43:20 <Eddi|zuHause> <andythenorth> so if I run with null video driver option, how am I testing fps? <-- you just "-v null:ticks=10000" and time it?
21:43:38 <andythenorth> I've managed to trigger the 'stuck at 30fps until a news message opens' behaviour
21:43:39 <nielsm> removing that line should cause the game to use a full CPU thread at all times but should show whether the slowness may be caused by the OS scheduler delaying next time slice for too long
21:44:49 *** sla_ro|master has quit IRC
21:44:56 <Eddi|zuHause> you could probably hack the null video driver to output fps on debug output?
21:45:12 <andythenorth> changing 691 to 0 nerfs the cursor
21:45:14 <andythenorth> game is unusable :)
21:45:33 <nielsm> okay leave that then :P
21:47:45 <andythenorth> changing 713 doesn't make much difference subjectively
21:47:55 <andythenorth> but performance is wildly variable and I'm not logging it
21:48:34 <andythenorth> I am going to video this behaviour, large file incoming :P
21:53:12 <andythenorth> there are 3 or 4 different behaviours
21:53:16 <andythenorth> might be common cause, might not
21:53:49 <andythenorth> can we open .mov files or do I need to convert?
21:56:12 <nielsm> can, but recoding it might save a lot of upload and download time
21:56:25 <nielsm> recoding/re-encoding
21:56:58 <andythenorth> https://dev.openttdcoop.org/attachments/download/9489/mac_fps.mov 57MB
21:57:07 <andythenorth> the small version was illegible
21:57:20 <andythenorth> there are a few interesting things to notice
21:58:37 <andythenorth> particularly the fps for all stages of news message
21:58:48 <andythenorth> and the fps for mouse movement, vs mouse movement over news message
22:00:26 <FLHerne> andythenorth: Any correlation between Intel/Nvidia/AMD graphics?
22:00:44 <andythenorth> not afaik
22:00:47 <Eddi|zuHause> is that news messages with or without èxtra viewport?
22:00:50 <FLHerne> I suppose there /shouldn't/ be if it's just blitting on the CPU
22:01:00 <nielsm> no viewport in the news
22:01:11 <nielsm> it's a vehicle introduction message
22:04:30 <andythenorth> there are other performance behaviours, but that's the weirdest
22:04:37 <andythenorth> obviously full animation is unusable
22:07:51 <Eddi|zuHause> andythenorth: does this behaviour change with https://github.com/Eddi-z/OpenTTD/commit/7cbb562ab756351479bf3b6ca06fb36c6e32214e
22:08:11 *** Samu has joined #openttd
22:08:26 <Eddi|zuHause> (related: i thought i made a PR for that, but i can't find it?)
22:09:07 <nielsm> Eddi|zuHause: you did https://github.com/OpenTTD/OpenTTD/pull/7612
22:09:51 <Eddi|zuHause> my search-fu must have failed me
22:09:57 <Eddi|zuHause> i searched both open and closed
22:11:11 <LordAro> Eddi|zuHause: :p
22:11:38 * andythenorth tries
22:11:45 <nielsm> andythenorth: just to be sure, did you try with both 32bpp and 8bpp blitter?
22:11:54 <andythenorth> I can repeat that
22:12:19 <andythenorth> the fps in the video doesn't manifest immediately or always btw
22:12:36 <andythenorth> I can get up to 9999fps at the start of a game, depending on zoom level and map contents
22:12:42 <andythenorth> then something triggers it
22:13:25 <Eddi|zuHause> andythenorth: the first (hidden) news message, maybe?
22:14:42 <andythenorth> appears to be yes
22:14:51 <andythenorth> they correlate
22:15:40 <Eddi|zuHause> so news display (possibly main status bar) is the area we should be looking at, probably
22:16:14 <Eddi|zuHause> andythenorth: are you testing 1.9.2 or nightly?
22:16:35 <nielsm> https://developer.apple.com/library/archive/documentation/Performance/Conceptual/power_efficiency_guidelines_osx/PrioritizeWorkAtTheAppLevel.html#//apple_ref/doc/uid/TP40013929-CH36-SW3
22:16:42 <andythenorth> mostly nightly
22:17:04 <andythenorth> and specifically I just tested 7612
22:17:10 <Eddi|zuHause> so that would already include pr 7612
22:17:33 <nielsm> try adding this at the start of QZ_GameLoop() function:
22:17:34 <nielsm> [[NSProcessInfo processInfo] beginActivityWithOptions: NSActivityUserInitiated reason: @"Game"];
22:18:07 <andythenorth> nielsm: I experimented recently with Instruments https://developer.apple.com/library/archive/documentation/Performance/Conceptual/PerformanceOverview/PerformanceTools/PerformanceTools.html
22:18:21 <andythenorth> gets me a lot of thread / call stack looking stuff
22:18:30 <andythenorth> can't say I understood it, but it gives timings
22:20:59 <Eddi|zuHause> andythenorth: watching your video closely, there's also a thing where it slows down/speeds up depending on whether a tooltip is shown
22:21:38 <nielsm> I need to sleep, gn
22:25:12 <andythenorth> thanks gn
22:25:51 <andythenorth> I re-ran a fresh game, the first hidden news message definitely correlates with the performance drop
22:26:04 <andythenorth> I don't have the ticker on for most cases btw
22:26:11 <andythenorth> they're entirely hidden
22:27:26 <andythenorth> Eddi|zuHause: that's a good spot, it's (very roughly) ~10x slower when tooltip shows
22:28:19 *** snail_UES_ has joined #openttd
22:28:20 <Eddi|zuHause> andythenorth: does it disappear if you set tooltip to right-click?
22:28:47 <Eddi|zuHause> (iirc that's tooltip-delay set to 0)
22:29:10 <andythenorth> I'll test
22:29:39 *** nielsm has quit IRC
22:31:22 <andythenorth> in the video it drops to 300fps or so on tooltip hover
22:31:32 <andythenorth> with tooltips on right-click, that isn't happening
22:31:35 <andythenorth> afaict
22:31:39 <andythenorth> it's all very subjective
22:32:08 <Eddi|zuHause> even if you right-click to show the tooltip?
22:32:14 <andythenorth> even with the tooltip open, the fps is ~constant
22:32:44 <Eddi|zuHause> this is definitely timer-related
22:32:53 <Eddi|zuHause> but this makes it tricky to debug
22:33:01 <andythenorth> well I can run Instruments
22:33:14 <andythenorth> it's quite unwieldy, and I'm not sure how you'd use the output
22:33:17 <Eddi|zuHause> there's very little i can do from here
22:34:01 <DorpsGek_II> [OpenTTD/OpenTTD] nikolas updated pull request #7685: Codechange: math functions - use cpp-style casts https://git.io/fjQs2
22:35:58 <andythenorth> I ran it for about 30s https://paste.openttdcoop.org/pifvpevu9/mt1ibs/raw
22:36:11 <andythenorth> this is a tree that can expand / drill down
22:38:56 <Samu> a quick fix of full loading tricks isn't working... :(
22:39:06 <Samu> ai is still doing bad
22:39:43 <Samu> unless I do 2 sets of shared order vehicles, 1 for each direction
22:40:13 <Samu> that would require some deep changes in the code :(
22:40:22 <andythenorth> https://paste.openttdcoop.org/pef0g4kgn/mnd7ty/raw
22:41:40 <andythenorth> I don't have any control to benchmark against, but that's a lot of time in RGBAf16_image_mark
22:42:11 <andythenorth> might be fine, dunno how mac graphics stack works
22:46:15 <Eddi|zuHause> andythenorth: i don't think that's the information we're looking for
22:47:10 <andythenorth> not surprising
22:47:16 <andythenorth> other things can be monitored
22:47:25 <andythenorth> but this might not be the right tool
22:51:34 *** HerzogDeXtEr has quit IRC
22:52:53 *** HerzogDeXtEr has joined #openttd
23:00:58 <andythenorth> also bed
23:01:23 *** andythenorth has quit IRC
23:18:19 *** Samu has quit IRC
23:19:14 *** Samu has joined #openttd
23:21:49 <Samu> experimenting with a minimum of 18 houses around the station
23:22:24 <Samu> starting results are improved
23:22:32 <Samu> but for how long...
23:34:13 *** Samu has quit IRC
23:37:29 *** frosch123 has quit IRC
23:44:54 *** lpx has quit IRC
23:47:09 <milek7> i launched openttd in macos mojave vm
23:47:20 <milek7> 1.9.2 seems to run fine, 34fps
23:48:17 *** lpx has joined #openttd