BuildCraft|Builders

BuildCraft|Builders

7M Downloads

Guide loading adding several minutes to load time...

Xetaxheb opened this issue · 45 comments

commented

Modpack: stoneblock 2 with some additions
BuildCraft version: 7.99.21
Forge version: 2796
Link to crash report or log: https://gist.github.com/Xetaxheb/5e7f4f382faa269eb82f30f4a0ec0aa6
Singleplayer or multiplayer: Getting to main menu
Steps to reproduce: Launch modpack
Additional information:

My pc isn't slow by any measure, and this is on an SSD. It's adding 4 minutes to a total of 12 minute loading time. The ftb progress screen sits there animating the FTB logo during this step.
I have optifine and some other possible interacting mods I guess (foamfix, vanillafix, betterfps; anything else is in the gist). I do not have any resource pack installed.


[06:16:04] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftcore:item/volume_box' (full path = 'buildcraftcore:compat/buildcraft/guide/en_us/item/volume_box.md') because we couldn't find any of the valid paths in any resource pack!
[06:16:06] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftcore:item/marker_volume' (full path = 'buildcraftcore:compat/buildcraft/guide/en_us/item/marker_volume.md') because we couldn't find any of the valid paths in any resource pack!
[06:16:06] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftfactory:block/autoworkbench_item' (full path = 'buildcraftfactory:compat/buildcraft/guide/en_us/block/autoworkbench_item.md') because we couldn't find any of the valid paths in any resource pack!
[06:16:06] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftcore:block/engine_creative' (full path = 'buildcraftcore:compat/buildcraft/guide/en_us/block/engine_creative.md') because we couldn't find any of the valid paths in any resource pack!
[06:18:12] [Client thread/INFO] [BuildCraft]: [lib.guide] Loaded 29 possible and 25 actual guide pages (4 not found) in 129695ms.
[06:18:14] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftcore:item/volume_box' (full path = 'buildcraftcore:compat/buildcraft/guide/en_us/item/volume_box.md') because we couldn't find any of the valid paths in any resource pack!
[06:18:15] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftcore:item/marker_volume' (full path = 'buildcraftcore:compat/buildcraft/guide/en_us/item/marker_volume.md') because we couldn't find any of the valid paths in any resource pack!
[06:18:15] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftfactory:block/autoworkbench_item' (full path = 'buildcraftfactory:compat/buildcraft/guide/en_us/block/autoworkbench_item.md') because we couldn't find any of the valid paths in any resource pack!
[06:18:15] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftcore:block/engine_creative' (full path = 'buildcraftcore:compat/buildcraft/guide/en_us/block/engine_creative.md') because we couldn't find any of the valid paths in any resource pack!
[06:20:24] [Client thread/INFO] [BuildCraft]: [lib.guide] Loaded 29 possible and 25 actual guide pages (4 not found) in 130972ms.
commented

I am having the same issue with several minute long wait times using latest version of forge for 1.12.2 and buildcraft-all-7.99.24.8.

latest.log
(Logs of interest starting at: 23:30:18)

commented

For some reason, for me this issue only seems to occur in Microsoft Windows. When I used Ubuntu with the same exact files except for the JRE being a linux version JRE, things load fine. Just FYI for anyone still looking at this thread years later.

commented

...It probably doesn't help that it's bugged ATM so it loads it twice...

commented

Although I'm not really sure why it even takes 2 minutes to load about 30 pages as it takes less than a second in my dev environment. I'll try adding some profiling code to see what's taking quite so long.

commented

@AlexIIL Regarding the double loading issue, isn't loadPage() being called twice here?

public interface IPageLoaderText extends IPageLoader {
@Override
default GuidePageFactory loadPage(InputStream in, ResourceLocation name, PageEntry<?> entry) throws IOException {
Reader reader = new InputStreamReader(in, StandardCharsets.UTF_8);
return loadPage(new BufferedReader(reader), name, entry);
}
GuidePageFactory loadPage(BufferedReader reader, ResourceLocation name, PageEntry<?> entry) throws IOException;
}

commented

@Brominarium no? That overrides the super-classes abstract method and provides an alternate method for implementers to override.

commented

Ok, so I've fixed the double-loading issue and now I'll look at the performance a bit more.

commented

I've added some profiling so that I can see what areas I need to try to optimise - can you retry with the test version 7.99.22-pre1 from the tests page and then upload your log file after running with it? (https://mod-buildcraft.com/pages/tests.html)

commented

Sure, here for reference is buildcraft-all-7.99.21.jar and a current log up to main menu (i've added more garbage, not that it should affect buildcraft) https://gist.github.com/Xetaxheb/f5c94b377282801af9e770f614d9193e

[09:42:48] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftcore:item/volume_box' (full path = 'buildcraftcore:compat/buildcraft/guide/en_us/item/volume_box.md') because we couldn't find any of the valid paths in any resource pack!
[09:42:49] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftcore:item/marker_volume' (full path = 'buildcraftcore:compat/buildcraft/guide/en_us/item/marker_volume.md') because we couldn't find any of the valid paths in any resource pack!
[09:42:49] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftfactory:block/autoworkbench_item' (full path = 'buildcraftfactory:compat/buildcraft/guide/en_us/block/autoworkbench_item.md') because we couldn't find any of the valid paths in any resource pack!
[09:42:49] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftcore:block/engine_creative' (full path = 'buildcraftcore:compat/buildcraft/guide/en_us/block/engine_creative.md') because we couldn't find any of the valid paths in any resource pack!
[09:45:14] [Client thread/INFO] [BuildCraft]: [lib.guide] Loaded 29 possible and 25 actual guide pages (4 not found) in 148337ms.
[09:45:16] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftcore:item/volume_box' (full path = 'buildcraftcore:compat/buildcraft/guide/en_us/item/volume_box.md') because we couldn't find any of the valid paths in any resource pack!
[09:45:17] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftcore:item/marker_volume' (full path = 'buildcraftcore:compat/buildcraft/guide/en_us/item/marker_volume.md') because we couldn't find any of the valid paths in any resource pack!
[09:45:17] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftfactory:block/autoworkbench_item' (full path = 'buildcraftfactory:compat/buildcraft/guide/en_us/block/autoworkbench_item.md') because we couldn't find any of the valid paths in any resource pack!
[09:45:17] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftcore:block/engine_creative' (full path = 'buildcraftcore:compat/buildcraft/guide/en_us/block/engine_creative.md') because we couldn't find any of the valid paths in any resource pack!
[09:47:29] [Client thread/INFO] [BuildCraft]: [lib.guide] Loaded 29 possible and 25 actual guide pages (4 not found) in 134041ms.

Below is buildcraft-all-7.99.22-pre1.jar https://gist.github.com/Xetaxheb/a70d34f896ab32b2529b6fe5c81d134a


[15:21:53] [Client thread/INFO] [botania]: The Lexica Botania has 32467 words.
[15:21:56] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload.book_registry' took aprox 710.101526 ms
[15:21:56] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload.page_registry' took aprox 740.368663 ms
[15:21:57] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftcore:item/volume_box' (full path = 'buildcraftcore:compat/buildcraft/guide/en_us/item/volume_box.md') because we couldn't find any of the valid paths in any resource pack!
[15:21:58] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftcore:item/marker_volume' (full path = 'buildcraftcore:compat/buildcraft/guide/en_us/item/marker_volume.md') because we couldn't find any of the valid paths in any resource pack!
[15:21:58] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftfactory:block/autoworkbench_item' (full path = 'buildcraftfactory:compat/buildcraft/guide/en_us/block/autoworkbench_item.md') because we couldn't find any of the valid paths in any resource pack!
[15:21:58] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftcore:block/engine_creative' (full path = 'buildcraftcore:compat/buildcraft/guide/en_us/block/engine_creative.md') because we couldn't find any of the valid paths in any resource pack!
[15:21:58] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload.load_default_lang' took aprox 1595.543168 ms
[15:22:00] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload.contents_page.add_default.buildcraft/lib/client/guide/entry/PageEntryItemStack.add_child' took aprox 414.169016 ms
[15:22:02] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload.contents_page.add_default.buildcraft/lib/client/guide/entry/PageEntryItemStack.add_child' took aprox 298.212497 ms
[15:22:12] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload.contents_page.add_default.buildcraft/lib/client/guide/entry/PageEntryItemStack.add_child' took aprox 7926.176175 ms
[15:22:14] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload.contents_page.add_default.buildcraft/lib/client/guide/entry/PageEntryItemStack' took aprox 15407.569527 ms
[15:22:14] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload.contents_page.add_default' took aprox 15432.997316 ms
[15:24:02] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload.contents_page.generate_quick_search' took aprox 108900.838004 ms
[15:24:14] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload.contents_page.sort' took aprox 11429.159387 ms
[15:24:14] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload.contents_page' took aprox 135876.441296 ms
[15:24:14] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload' took aprox 138949.384892 ms
[15:24:14] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root' took aprox 138949.47706 ms
[15:24:14] [Client thread/INFO] [BuildCraft]: [lib.guide] Loaded 29 possible and 25 actual guide pages (4 not found) in 138927ms.
[15:24:14] [Client thread/INFO] [BuildCraft]: [lib.guide] Performance information for guide loading:
[15:24:14] [Client thread/INFO] [BuildCraft]: [00] reload - 100.00%/100.00 (138s)
[15:24:14] [Client thread/INFO] [BuildCraft]: [01] |   contents_page - 97.79%/97.79 (135s)
[15:24:14] [Client thread/INFO] [BuildCraft]: [02] |   |   generate_quick_search - 80.15%/78.37 (108s)
[15:24:14] [Client thread/INFO] [BuildCraft]: [02] |   |   add_default - 11.36%/11.11 (15,434ms)
[15:24:14] [Client thread/INFO] [BuildCraft]: [03] |   |   |   buildcraft/lib/client/guide/entry/PageEntryItemStack - 99.81%/11.09 (15,405ms)
[15:24:14] [Client thread/INFO] [BuildCraft]: [04] |   |   |   |   add_child - 61.23%/6.79 (9,432ms)
[15:24:14] [Client thread/INFO] [BuildCraft]: [04] |   |   |   |   unspecified - 38.77%/4.30 (5,973ms)
[15:24:14] [Client thread/INFO] [BuildCraft]: [03] |   |   |   buildcraft/lib/client/guide/entry/PageEntryStatement - 0.16%/0.02 (24,959µs)
[15:24:14] [Client thread/INFO] [BuildCraft]: [04] |   |   |   |   unspecified - 90.64%/0.02 (22,623µs)
[15:24:14] [Client thread/INFO] [BuildCraft]: [04] |   |   |   |   add_child - 9.36%/0.00 (2,336µs)
[15:24:14] [Client thread/INFO] [BuildCraft]: [03] |   |   |   unspecified - 0.03%/0.00 (4,354µs)
[15:24:14] [Client thread/INFO] [BuildCraft]: [03] |   |   |   buildcraft/lib/client/guide/entry/PageEntryExternal - 0.00%/0.00 (6,375ns)
[15:24:14] [Client thread/INFO] [BuildCraft]: [02] |   |   sort - 8.41%/8.23 (11,427ms)
[15:24:14] [Client thread/INFO] [BuildCraft]: [02] |   |   add_pages - 0.05%/0.05 (72,402µs)
[15:24:14] [Client thread/INFO] [BuildCraft]: [03] |   |   |   unspecified - 97.41%/0.05 (70,527µs)
[15:24:14] [Client thread/INFO] [BuildCraft]: [03] |   |   |   add_child - 2.59%/0.00 (1,874µs)
[15:24:14] [Client thread/INFO] [BuildCraft]: [02] |   |   setup - 0.03%/0.03 (36,683µs)
[15:24:14] [Client thread/INFO] [BuildCraft]: [02] |   |   unspecified - 0.00%/0.00 (435µs)
[15:24:14] [Client thread/INFO] [BuildCraft]: [02] |   |   clear - 0.00%/0.00 (9,246ns)
[15:24:14] [Client thread/INFO] [BuildCraft]: [01] |   load_default_lang - 1.15%/1.15 (1,595ms)
[15:24:14] [Client thread/INFO] [BuildCraft]: [01] |   page_registry - 0.53%/0.53 (740ms)
[15:24:14] [Client thread/INFO] [BuildCraft]: [01] |   book_registry - 0.51%/0.51 (709ms)
[15:24:14] [Client thread/INFO] [BuildCraft]: [01] |   unspecified - 0.02%/0.02 (22,830µs)
[15:24:14] [Client thread/INFO] [BuildCraft]: [01] |   generate_books - 0.00%/0.00 (2,289µs)
[15:24:14] [Client thread/INFO] [BuildCraft]: [01] |   add_pages - 0.00%/0.00 (995µs)
[15:24:14] [Client thread/INFO] [BuildCraft]: [01] |   setup - 0.00%/0.00 (768µs)
[15:24:14] [Client thread/INFO] [BuildCraft]: [01] |   load_real_lang - 0.00%/0.00 (41,772ns)
[15:24:14] [Client thread/INFO] [BuildCraft]: [00] unspecified - 0.00%/0.00 (98,288ns)
[15:24:14] [Client thread/INFO] [BuildCraft]: [lib.guide] End of guide loading performance information.
[15:24:15] [Client thread/INFO] [chancecubes]: Adding minecraft:bedrock:0 to NRB array.
commented

Thanks for running that.

generate_quick_search - 80.15%/78.37 (108s)
add_default - 11.36%/11.11 (15,434ms)
|   buildcraft/lib/client/guide/entry/PageEntryItemStack - 99.81%/11.09 (15,405ms)

Oh well, I was hoping the most expensive one wasn't going to be "generate_quick_search" as that's a vanilla method call :(

Maybe I can try sending less data to it? I'm not sure, I'll have to think a bit about how I want to optimise that.

commented

Ok, it turned out that I was adding about 6 duplicate search entries to the searcher (which is somewhat wasteful) so I've pushed 7.99.22-pre2 with that fix as well. Can you re-test with that one as well? (I'm also not doing any more tonight so there's no rush :p)

commented

Progress! https://gist.github.com/Xetaxheb/b260d096c801497daa7e26b6f41f1df0
Also comparison "surge"'s loading time report: 21, 721s \ 22-pre1, 568s \ 22-pre2, 487s


[16:00:57] [Client thread/INFO] [botania]: The Lexica Botania has 32467 words.
[16:00:59] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload.book_registry' took aprox 734.23895 ms
[16:01:00] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload.page_registry' took aprox 755.49075 ms
[16:01:00] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftcore:item/volume_box' (full path = 'buildcraftcore:compat/buildcraft/guide/en_us/item/volume_box.md') because we couldn't find any of the valid paths in any resource pack!
[16:01:02] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftcore:item/marker_volume' (full path = 'buildcraftcore:compat/buildcraft/guide/en_us/item/marker_volume.md') because we couldn't find any of the valid paths in any resource pack!
[16:01:02] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftfactory:block/autoworkbench_item' (full path = 'buildcraftfactory:compat/buildcraft/guide/en_us/block/autoworkbench_item.md') because we couldn't find any of the valid paths in any resource pack!
[16:01:02] [Client thread/WARN] [BuildCraft]: [lib.guide.loader] Unable to load guide page 'buildcraftcore:block/engine_creative' (full path = 'buildcraftcore:compat/buildcraft/guide/en_us/block/engine_creative.md') because we couldn't find any of the valid paths in any resource pack!
[16:01:02] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload.load_default_lang' took aprox 1499.569453 ms
[16:01:08] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload.contents_page.add_default.buildcraft/lib/client/guide/entry/PageEntryItemStack.add_child' took aprox 108.057735 ms
[16:01:09] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload.contents_page.add_default.buildcraft/lib/client/guide/entry/PageEntryItemStack' took aprox 6743.970268 ms
[16:01:09] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload.contents_page.add_default' took aprox 6773.480918 ms
[16:01:25] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload.contents_page.generate_quick_search' took aprox 16777.577813 ms
[16:01:36] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload.contents_page.sort' took aprox 10882.343298 ms
[16:01:36] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload.contents_page' took aprox 34550.124604 ms
[16:01:36] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root.reload' took aprox 37564.805938 ms
[16:01:36] [Client thread/WARN] [minecraft/Profiler]: Something's taking too long! 'root' took aprox 37564.895556 ms
[16:01:36] [Client thread/INFO] [BuildCraft]: [lib.guide] Loaded 29 possible and 25 actual guide pages (4 not found) in 37544ms.
[16:01:36] [Client thread/INFO] [BuildCraft]: [lib.guide] Performance information for guide loading:
[16:01:36] [Client thread/INFO] [BuildCraft]: [00] reload - 100.00%/100.00 (37,544ms)
[16:01:36] [Client thread/INFO] [BuildCraft]: [01] |   contents_page - 91.97%/91.97 (34,531ms)
[16:01:36] [Client thread/INFO] [BuildCraft]: [02] |   |   generate_quick_search - 48.56%/44.66 (16,768ms)
[16:01:36] [Client thread/INFO] [BuildCraft]: [02] |   |   sort - 31.50%/28.97 (10,876ms)
[16:01:36] [Client thread/INFO] [BuildCraft]: [02] |   |   add_default - 19.62%/18.04 (6,774ms)
[16:01:36] [Client thread/INFO] [BuildCraft]: [03] |   |   |   buildcraft/lib/client/guide/entry/PageEntryItemStack - 99.49%/17.95 (6,740ms)
[16:01:36] [Client thread/INFO] [BuildCraft]: [04] |   |   |   |   unspecified - 91.99%/16.51 (6,200ms)
[16:01:36] [Client thread/INFO] [BuildCraft]: [04] |   |   |   |   add_child - 8.01%/1.44 (540ms)
[16:01:36] [Client thread/INFO] [BuildCraft]: [03] |   |   |   buildcraft/lib/client/guide/entry/PageEntryStatement - 0.43%/0.08 (29,002µs)
[16:01:36] [Client thread/INFO] [BuildCraft]: [04] |   |   |   |   unspecified - 94.00%/0.07 (27,263µs)
[16:01:36] [Client thread/INFO] [BuildCraft]: [04] |   |   |   |   add_child - 6.00%/0.00 (1,739µs)
[16:01:36] [Client thread/INFO] [BuildCraft]: [03] |   |   |   unspecified - 0.08%/0.01 (5,471µs)
[16:01:36] [Client thread/INFO] [BuildCraft]: [03] |   |   |   buildcraft/lib/client/guide/entry/PageEntryExternal - 0.00%/0.00 (6,373ns)
[16:01:36] [Client thread/INFO] [BuildCraft]: [02] |   |   add_pages - 0.22%/0.20 (74,984µs)
[16:01:36] [Client thread/INFO] [BuildCraft]: [03] |   |   |   unspecified - 97.55%/0.19 (73,146µs)
[16:01:36] [Client thread/INFO] [BuildCraft]: [03] |   |   |   add_child - 2.45%/0.00 (1,838µs)
[16:01:36] [Client thread/INFO] [BuildCraft]: [02] |   |   setup - 0.10%/0.10 (36,163µs)
[16:01:36] [Client thread/INFO] [BuildCraft]: [02] |   |   unspecified - 0.00%/0.00 (514µs)
[16:01:36] [Client thread/INFO] [BuildCraft]: [02] |   |   clear - 0.00%/0.00 (10,517ns)
[16:01:36] [Client thread/INFO] [BuildCraft]: [01] |   load_default_lang - 3.99%/3.99 (1,498ms)
[16:01:36] [Client thread/INFO] [BuildCraft]: [01] |   page_registry - 2.01%/2.01 (755ms)
[16:01:36] [Client thread/INFO] [BuildCraft]: [01] |   book_registry - 1.95%/1.95 (733ms)
[16:01:36] [Client thread/INFO] [BuildCraft]: [01] |   unspecified - 0.06%/0.06 (21,296µs)
[16:01:36] [Client thread/INFO] [BuildCraft]: [01] |   generate_books - 0.01%/0.01 (2,554µs)
[16:01:36] [Client thread/INFO] [BuildCraft]: [01] |   add_pages - 0.00%/0.00 (876µs)
[16:01:36] [Client thread/INFO] [BuildCraft]: [01] |   setup - 0.00%/0.00 (595µs)
[16:01:36] [Client thread/INFO] [BuildCraft]: [01] |   load_real_lang - 0.00%/0.00 (41,437ns)
[16:01:36] [Client thread/INFO] [BuildCraft]: [00] unspecified - 0.00%/0.00 (90,063ns)
[16:01:36] [Client thread/INFO] [BuildCraft]: [lib.guide] End of guide loading performance information.
[16:01:38] [Client thread/INFO] [chancecubes]: Adding minecraft:bedrock:0 to NRB array.
commented

Semi-related note, I had no idea this thing was in buildcraft. You've basically copied JEI/NEI into a book form? Edit: Unless a lot of non-buildcraft related things aren't supposed to be showing up in search (strangely for some btw; like "Chickens" chicken eggs)

commented

It's main purpose is to be an in-game wiki for buildcraft, however one of the requirements for that is to show all recipes of buildcraft. From there adding every-item-searching functionality and "implicit" pages (with only recipes and no text) isn't difficult. It's obviously not going to be as useful as JEI/NEI are for recipe lookups though.

commented

Not unless you have a very good reason for disabling it.

commented

Understandable.

I am condensing the books/guides into FTB Guides for my pack and this makes the mid included books redundant. Or in some cases actually reduces mods as in the case of the in game wiki mod, the charset book, guide API, and a couple others.

Actually built in support for the FTB Guide mod would be awesome but that is for another issue.

commented

Question..... Is their a way to disable the book in the config or if not could that be added?

commented

I appreciate your idea of the in-game Guide Book but it would be better if we can choose to enable/disable it.

commented

I appreciate your idea of the in-game Guide Book but it would be better if we can choose to enable/disable it.

Disagree, no need to after the loading fixes. The 37s load time is on an already pretty huge modpack with several things that could be interfering. 37s is perfectly acceptable compared to 4 minutes.

I will say however that with how ubiquitous JEI is (and the fact it's clientsided and doesn't require an actual item to use) the only advantage of the 'buildcraft guide' is relational information (i.e. "here are blocks from buildcraft and what for") and the gui could use some improvement for clarity and purpose. It's a little cluttered and un-intuitive but looks like a decent base for something that could be as useful as botania lexicon.

On that note however, you might want to put the implementation on the backburner and look at https://minecraft.curseforge.com/projects/patchouli ? If only in an interim for organizing your thoughts about what should actually go into the guide besides this search feature. That said, I've no idea how much of patchouli is a hard dependency or if you can include api code that won't cause issues if patchouli isn't installed.

commented

37 seconds is still too long, especially considering that it only spends 80ms of that loading buildcraft's pages, the rest of it is trying to index every item. If I can't work out a good way of optimizing that then I'll probably only add buildcraft items to the index instead of everything.

... ubiquitous JEI is (and the fact it's clientsided and doesn't require an actual item to use)...

Embedding the buildcraft guide pages in JEI would hopefully be fairly simple to add, however that would only work for items and not anything else (like gate triggers, gate actions, gate parameters, robot AI behaviours, etc).

you might want to put the implementation on the backburner

It's already nearly feature complete (it's just a text displayer, it's not that complicated at heart). Especially compared with everything else that I have to do the guide won't take that long to finish.

the gui could use some improvements for clarity and purpose

Could you list them? While I've got some of my own plans to make it better it would be helpful to know more :)

look at patchouli

It was released after I'd already done a lot of the guide book work, so there's basically no reason to move over to it.

commented

Oh and proper FTB guide book support is fairly unlikely to happen in the near future. (Although I haven't looked into it at all).

However being able to quickly move from one guidebook interface to another (for example a link in the BC guide book from a BC page to an FTB guide book page and vice versa) is something I'd be more likely to look into. Although not anytime soon.

commented

37 seconds is still too long, especially considering that it only spends 80ms of that loading buildcraft's pages, the rest of it is trying to index every item. If I can't work out a good way of optimizing that then I'll probably only add buildcraft items to the index instead of everything.

I agree, I meant more as an objection to 'being able to enable/disable it being a priority/necessary'. (also, for things like server mismatch: maybe just a chat message on use "you've disabled the guide on your client" + removing JEI listing?)

Embedding the buildcraft guide pages in JEI would hopefully be fairly simple to add, however that would only work for items and not anything else (like gate triggers, gate actions, gate parameters, robot AI behaviours, etc).

I admit I haven't done anything substantial with buildcraft since a fair few minecraft versions so I don't know what you mean by those examples, but JEI is very capable of showing many kinds of custom data with a tiny bit of groundwork to create the data and format it. If you have an hour or so to flip through https://minecraft.curseforge.com/projects/jei/relations/dependents?filter-related-dependents=3 mods that extend JEI's capability, there's some good examples in there. Ex Niliho Creatio also has some interesting things like barrel transformations. (sidenote, if you "view uses" for a crafting table then click the header word "Crafting" you can see every JEI recipe category you have installed)

In the case of gate triggers/etc, you could definitely integrate JEI "+" loading of some presets/etc that you think are useful into the 4 slots of like an "iron and gate". In this case you would make a new JEI tab that shows relevant recipes when one is seeing "uses" for the gates. It wouldn't be hard to add a "show recipes" button somewhere on the GUI that leads to JEI popup.

It was released after I'd already done a lot of the guide book work, so there's basically no reason to move over to it.

Apologies, I wasn't very clear. I meant moreso looking at how information is categorized and laid out (and in for example botania); and moving over may or may not be easier as a sidenote.

Could you list them? While I've got some of my own plans to make it better it would be helpful to know more :)

  • Right off the bat it's fairly unintuitive and unexplained. I have no idea what those buttons on the left (t T M?) are supposed to be doing (some kind of display filtering?) and tooltips on hover could solve that issue. Best guess is "sort by type with categories", "sort by pure type", "sort by mod"?
  • Being unable to search from the "first page" is inconvenient; even if I have to click the magnifying glass instead of just typing.
  • If I click pipes/triggers tabs the blocks/items tabs disappear? I guess this is like a "forward/backward" indicator but having it jump side to side is confusing, and the tabs disappearing just because their headers are literally on the page is kinda hard to use.
  • Does the pen serve a purpose or is it just flair? If it has a use I can't find it and if it doesn't (while neat and amusing) extra gui clutter in an info dump is distracting at most, and probably ignored after the first little notice.
  • Why are the dots next to headers (like "recipe" or "uses" or "item name" highlight-able on mouseover? are they buttons intended to do something?

I think you've done a great job so far, just be sure to ask yourself on everything you add to the framework of the guide "why am I adding this and how does it help me communicate to the player the information they need" as well as "is this something someone new to modded minecraft could intuitively figure out in less than 10-20 seconds". These two questions aren't as relevant to content in a mod, but for something like a guide these are very important.

I want to point at lexica botania as a great example again, not because of fanboying or "please make this more like botania" but because vazkii has put in a lot of effort to make the book usable and understandable both easily and quickly and it shows. Something like "right click/backspace to go back a page" might not be that clear to a newer player (or even older) so it's pointed out in the little 7 page 'book tutorial' that comes up the first time you open the book, for instance. Obviously buildcraft isn't as obscure or comprehensive as botania in terms of vanilla minecraft style overhauling, so a guided tutorial through basic entries isn't needed; but being able to understand as a player what I am looking at in the guide and for me to understand why I have chosen to look at the information (aka "why am I on this page, what purpose does it serve me to be here") is very important.

Your best bet in my opinion would be to first focus on making the guide comprehensive and work well for buildcraft, and worry about any kind of "extra recipes" or "other mods" later down the line once it's doing good work for your mod.

As a final note, if I search for something like engine ( https://i.imgur.com/NLwm2gq.png little test package with a few other mods loaded) I like the idea of having buildcraft entries first, but the categorizations could use some streamlining. I don't think having the search results display differently based on the t/T/M buttons should happen, as that is unintuitive/hidden, so maybe just sort by mod id's alphabetically after buildcraft's entries? That would add a lot of headers though, unfortunately. But I don't think "all other items matching this name in alphabetical order" is easier to get a good idea of what you're looking for/at as a guide resource goes. Perhaps just sort them by mod id like JEI does and no header, just the tooltips?

commented

I think the inlined picture has a lot more clarity than the little dots did and would look aesthetically pleasing if (say you had more pages to work with and were currently viewing only "pipes") the bookmarks were left=prior, right=upcoming.

I personally prefer the bookmarks to all be in one static position (as opposed to "realistic" moving from side to side as you go through pages) for quicker/consistent memory/recognition of how to get where you want but again I think the inline does look quite nice.

It's just slightly annoying as "everything else" doesn't necessarily have a lot of guide-specific information to go with it to help sort it properly (unlike everything in buildcraft).

I'm not familiar with the specific system but quite a few mods have JEI entries on certain items with a header that is a blue circle with a white i for the logo (basic "Information Kiosk" logo), and I don't know if it's some api call to JEI that individual mods do or what but maybe importing that information is a possibility for misc guide entries. There are also mods like ActuallyAdditions that have their own guides which definitely pass info to JEI somehow [previews] and could possibly be made compatible.

As an addendum, recently JEI implemented "bookmarking" singular items to quickly access them (whether for recipes/uses, spawning in, or just a personal checklist); being able to custom bookmark specific pages in the buildcraft guide (maybe across the bottom) if things would/could be sorted primarily by mod id (or secondarily after block/item categorizing) that could actually be incredibly useful to quickly jump to basically an info dump of a certain mods stuff (typing @modname in JEI would accomplish the same, but guide format and faster access via guide bookmark).
Lastly, I feel like keeping the "display type" (t/T/M) feature would be beneficial, although perhaps not the "mod then submod" entry as that's a rare case and really the distinction will never be relevant to an end user. Maybe similar to:

  • [Type:Block/Item, Alphabetical] (sort by type)
  • [ModName, Type:Block/Item, Alphabetical] (sort by mod)
  • [Alphabetical] (sort alphabetically)

with appropriate ingrained bookmarks (first set "Blocks Items Pipes etc"; second set "ModA ModB ModC etc"; third set "A B C D E F G etc").

Thanks for all your hard work on BuildCraft, I hope to see all the neat things and features you come up with in the future!

commented

I admit I haven't done anything substantial with buildcraft ... you can see every JEI recipe category you have installed)

I blindly assumed that JEI could only handle items, but when I looked back at it's API it accepts any object instead. So I spoke too soon :p

In the case of gate triggers/etc, you could definitely integrate JEI "+" loading of some presets/etc that you think are useful into the 4 slots of like an "iron and gate". In this case you would make a new JEI tab that shows relevant recipes when one is seeing "uses" for the gates. It wouldn't be hard to add a "show recipes" button somewhere on the GUI that leads to JEI popup.

Technically yes, but I don't think that would be very useful - as JEI is mostly used for displaying "real objects" but triggers and actions are temporary gui elements instead. (And I'm not really sure what sensible defaults could be usefully provided that wouldn't make more sense as normal examples in JEI. And the gate GUI itself could probably be cleaned up a bit more, although I have another issue (#4063) open for that.

Apologies, I wasn't very clear. I meant moreso looking at how information is categorized and laid out (and in for example botania); and moving over may or may not be easier as a sidenote.

Ah ok, that would make more sense :)

Right off the bat it's fairly unintuitive and unexplained. I have no idea what those buttons on the left (t T M?) are supposed to be doing (some kind of display filtering?) and tooltips on hover could solve that issue. Best guess is "sort by type with categories", "sort by pure type", "sort by mod"?

Technically it's "sort by type", "sort by mod then type", "sort by mod then submod". However it's completely useless, so I have no problems just removing it 📦

Being unable to search from the "first page" is inconvenient; even if I have to click the magnifying glass instead of just typing.

That's true. Originally I wanted it to make itself more obvious when you went to the next page but that's not a great reason to hide it at the beginning.

If I click pipes/triggers tabs the blocks/items tabs disappear? I guess this is like a "forward/backward" indicator but having it jump side to side is confusing, and the tabs disappearing just because their headers are literally on the page is kinda hard to use.

and

Why are the dots next to headers (like "recipe" or "uses" or "item name" highlight-able on mouseover? are they buttons intended to do something?

I was originally trying to go for a more realistic bookmark system, where bookmarks on previous pages are shown on the left side, and bookmarks on pages further ahead are shown on the right. However I suppose this doesn't quite work because the bookmark headers are only shown with the little "button like" dot, rather than a proper bookmark. And yes, that's confusing because it's decoration rather than an actual button that does something.

I'm not sure whether to change the bookmark headers to show an actual bookmark (when they are open) and/or move all other, non-visible bookmarks over to one side.
Inlined:
Inlined bookmarks
Moved to side:
Moved to the side

Does the pen serve a purpose or is it just flair? If it has a use I can't find it and if it doesn't (while neat and amusing) extra gui clutter in an info dump is distracting at most, and probably ignored after the first little notice.

Originally it was going to be for editing the guide pages directly. However it doesn't make much sense to have it visible inside the guide book normally, and I don't think I'll even implement an editor (and definitely not in the same GUI) so I'll just remove it instead.

I want to point at lexica botania as a great example ... Something like "right click/backspace to go back a page" ... little 7 page 'book tutorial' ...

Yes, I'll have a look at the lexica botania a bit more, however at the very least showing the basics of how the guide works should probably be on page 2 rather than the mod list (which is less important to the player, and really should be somewhere else instead).

As a final note, if I search for something like engine ( https://i.imgur.com/NLwm2gq.png little test package with a few other mods loaded) I like the idea of having buildcraft entries first, but the categorizations could use some streamlining

Currently it displays everything that has information about it first (which is obviously only buildcraft at the moment) and then I just shoved everything else in at the end (because it was the simplest thing to do). I'll look into organising those a bit better later. It's just slightly annoying as "everything else" doesn't necessarily have a lot of guide-specific information to go with it to help sort it properly (unlike everything in buildcraft).

I don't think having the search results display differently based on the t/T/M buttons should happen, as that is unintuitive/hidden

Oh whoops, I just removed them slightly higher up :)

so maybe just sort by mod id's alphabetically after buildcraft's entries? That would add a lot of headers though, unfortunately. But I don't think "all other items matching this name in alphabetical order" is easier to get a good idea of what you're looking for/at as a guide resource goes. Perhaps just sort them by mod id like JEI does and no header, just the tooltips?

...maybe. I'm not sure how much of an improvement that is though, or how useful knowing which mod has which item is either - at least if it's all alphabetical then it's easier to search for something by looking down the list. (But I'll come back to this sometime in the future).

Thanks for the feedback though!

commented

Just wanted to add on to this, I was using buildcraft-all-7.99.22.jar, which in the changelog mentions that it optimized the guide book loading, but it was still taking a very long time for me. Not sure if other mods effect the loading process for it, but adding that buildcraft version to my mods folder increased my load time from about 4-5 minutes to over 30 minutes. Looking forward to seeing it in an update so I can continue using it!

commented

@RaiRaiTheRaichu Can you post your entire log from "play" to main menu? Either on gist or upload a txt/log file somewhere.
If you don't want to run the entire process and still have the log fro when you did, that would be fine too.

commented

Thanks for uploading - it looks like the same problem that everyone's having, and I think it's because I add every item to a search index - even items with very large numbers of sub-items (like buildcraft facades, and probably other things like covers and micro blocks. Hopefully that is the cause though.

commented

I've figured something out, actually. The loading process hangs every time if I have the game window AND the multimc console on a different monitor than my active one. It forces me to kill the process because the console appears to be at a standstill. Not that the log shows particularly much, but I linked it here anyway.
https://gist.github.com/RaiRaiTheRaichu/51e3f67f8b68a3014aefcbbf218c4846

commented

...ok that's a strange problem. I don't think this issue is a good place to track it though.

commented

Yeah, definitely very weird. I'll open a separate issue since it turns out this is probably different after all.

commented

@Xetaxheb So I'm having trouble replicating the issue now. I originally thought it might have been because I had the game window minimized on a second monitor, but everything seems to be working fine, now. I ran the game several times, active on my main 1440p monitor, inactive on my 4k monitor minimized, then on a 1080p monitor, and each time the game took about 5m and 30-40s to load, with the guide being built in about 20 seconds each time. If there's something you want me to test, let me know and I'd be more than happy to try it out and send the log.

I don't have that specific log anymore, but I do have a log of pretty much exactly what was going on when it did take seemingly forever to load. In this particular log, I ended up killing the process because it seemed to hang at this part for about a half hour again and I didn't want to sit around to see if it would ever load. I don't know if it was buildcraft specifically because it does say the guide was built in the log, but the screen was still showing forge on Loading - Initializing mods Phase 3, PostInitialization - BuildCraft Lib, Loading Resource - GuideManager. I can't seem to replicate this issue, so it had to have been something weird on my end. I thought it was because I used multimc to increase the max available memory to 8gb and the loading screen shows 7282mb for some reason, but even setting it back to that won't replicate it.

https://gist.github.com/RaiRaiTheRaichu/12be2b4c67655a56931be02c0ea50988

Again, if there's anything you want tested regarding this issue (or others) just let me know.

commented

More Information is always good:

~ Edited to include requested information that @Xetaxheb requested~

commented

More Information is always good:

https://gist.github.com/bookerthegeek/db145ba88dd6e17872f3e5afb0b94bba

@bookerthegeek Please include the whole log. Context like what mods you have loaded is important.

commented

Ok I've implemented some more optimisations since 7.99.22 for 7.99.23, so please wait until then before adding more logs.

commented

Ok I've uploaded a prerelease of 7.99.23-pre1 - this should make it at least a bit faster.

commented

Build Craft Version: buildcraft-all-7.99.24.3

Just wanted to update, this Is still a huge issue (at least for the custom pack my community is running)

As you can see in the log below (Taken from a client environment) the load times for the manual are high.

Client Log Snippet:
https://pastebin.com/r6kXPNKg

Please Please Please can you give us the option to disable the guide, our community prefers JEI lookups over ingame manuals/guides.

All this is doing is adding a huge chunk of time to the loading progress of the server and client.

Honestly one of the only reasons we are using BuildCraft right now is for it's pump and and a very few other elements.

commented

@Terminal-Access I've released 7.99.24.4, which includes a few performance improvements - can you retest with that?

(Also, just to check: does it add only about 6 seconds? Most of the other reports are for multiple minutes being taken up, which is a lot more serious).

All this is doing is adding a huge chunk of time to the loading progress of the server and client.

Are you sure this adds loading time to the server? As far as I'm aware the guide book code doesn't run on the server...

commented

Testing v7.99.24.4:
Certainly I shall switch over to that and run some performance tests for you then report back my findings, cheers for the heads up and pushing those performance fixes out!

6s Extra Load time:
Yes we have had it range between adding 1s to 13s thus far.
My team are very good at optimizing the set of mods we play with, configuring configs, cutting out the bloated mods, sorting out oredict, recipe conflicts e.t.c so generally the custom packs we play on are highly efficient when loading, 6s-13s to load a simple guide resource for us seems high.

Running on the server:
Have just double checked this, I was mistaken, you are correct it's only loading on the client, apologies for the confusion there.

Note on Config Options:
as most of our members prefer to learn the in-game mechanics of the mods by trial and error, they get more of a scene of accomplishment that way, or falling back on JEI when all else fails, could I request, if it's not already an options, to have a boolean (true/false) option to disable the guide, as honestly I don't think any of our players would use it (please don't get me wrong I'm not saying others wont however)

commented

[15:00:41] [Client thread/INFO] [BuildCraft]: [lib.guide] End of guide loading performance information. (6311ms)

you're massively overreacting here. a grand total of 6 seconds during initial minecraft client load is a non-issue... the only reason this was brought up originally was it took close to 4 minutes in previous versions.

commented

Extra load time: "between adding 1s to 13s thus far"

That's quite a large difference. Were the times taken on the same machine? (Although I'm more interested in whether adding the limit helps at all).

Yes that was the same computer, however the 13s would have been prior to the pack configuration optimization where as the 6/7s (current with the "7.99.24.3" release) were after we have properly gone through the configuration of the mod pack.
The 1s was on a very lean clean build. generally on the pack we were seeing lows of 6/7 after optimization.

Testing v7.99.24.4:

I'll have some results for you shortly, Just have to clear my current work schedule then i can run some tests.

Configs

I'm generally fairly hesitant to allow outright disabling something due only to it's performance impact, as I'd rather optimize it instead.

IMHO - you should always give your users the option to have an element enabled/disabled, that way those who would rather not use a mechanic or guide, as in this case, can chose not to.

Though, from a coders standpoint, I do 100% understand the need to optimize your code, Id simply do both, work on optimizing the code, that way those that will use the new mechanic/guide will glean the benefits of it, and add an option in to disable it for those that don't require it for their pack.

Just my thoughts on the matter.

commented

Extra load time: "between adding 1s to 13s thus far"

That's quite a large difference. Were the times taken on the same machine? (Although I'm more interested in whether adding the limit helps at all).

Configs

I'm generally fairly hesitant to allow outright disabling something due only to it's performance impact, as I'd rather optimise it instead.

commented

Bumping this, since i'm having the same issue. Running modded Minecraft with latest Buildcraft (buildcraft-all-7.99.24.5.jar), latest Forge for 1.12.2 (forge-1.12.2-14.23.5.2847), and 100 other mods.

I've managed to run Minecraft once or twice normally, without having to wait several minutes for guide. Then, i added latest Optifine (HD_U_F5 for 1.12.2) and issue first appeared. I have deleted Optifine and tried running Minecraft again, but it didn't changed anything, Buildcraft began to do stuff with guide, taking several minutes.

This is how it looks like in log, i'm trying to run Minecraft now.
image

Haven't been able to run it successfully after that yet, Buildcraft did this thing once and then my loading halted on CraftTweaker2 LoadComplete which i have to fix yet. Is BuildCraft saving this and does it need to be ran just once?

UPDATE: both problems dissapeared after i've ran Minecraft WITHOUT TOUCHING THE LOADING WINDOW. No moving, no clicking, nothing.

apparently, just let forge do it's shenanigans, do not disturb the ancient forge gods by touching the loading window, and everything will work fine.

commented

i also have the same issue on 1.12.2 it DOES load eventually but it takes 2-3 minutes to get past buildcraft lib on phas 5/7

commented

I have the same issue as well
GUIDE_LOAD.txt

commented

@jcoy0907 please include your entire log and minecraft/buildcraft versions

this issue was 99%+ resolved a long time ago and likely you're using an outdated buildcraft version prior to the fixes