New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guide loading adding several minutes to load time... #4328

Open
Xetaxheb opened this Issue Jan 19, 2019 · 22 comments

Comments

Projects
None yet
5 participants
@Xetaxheb
Copy link

Xetaxheb commented Jan 19, 2019

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.
@AlexIIL

This comment has been minimized.

Copy link
Member

AlexIIL commented Jan 19, 2019

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

@AlexIIL AlexIIL added the type: bug label Jan 19, 2019

@AlexIIL

This comment has been minimized.

Copy link
Member

AlexIIL commented Jan 19, 2019

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.

@Brominarium

This comment has been minimized.

Copy link

Brominarium commented Jan 21, 2019

@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;
}

@AlexIIL AlexIIL closed this in 4e1e13b Jan 21, 2019

@AlexIIL

This comment has been minimized.

Copy link
Member

AlexIIL commented Jan 21, 2019

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

@AlexIIL

This comment has been minimized.

Copy link
Member

AlexIIL commented Jan 21, 2019

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

AlexIIL added a commit that referenced this issue Jan 21, 2019

@AlexIIL

This comment has been minimized.

Copy link
Member

AlexIIL commented Jan 21, 2019

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)

@Xetaxheb

This comment has been minimized.

Copy link
Author

Xetaxheb commented Jan 21, 2019

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.
@AlexIIL

This comment has been minimized.

Copy link
Member

AlexIIL commented Jan 21, 2019

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.

@AlexIIL

This comment has been minimized.

Copy link
Member

AlexIIL commented Jan 21, 2019

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)

@Xetaxheb

This comment has been minimized.

Copy link
Author

Xetaxheb commented Jan 22, 2019

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.
@Xetaxheb

This comment has been minimized.

Copy link
Author

Xetaxheb commented Jan 22, 2019

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)

@AlexIIL

This comment has been minimized.

Copy link
Member

AlexIIL commented Jan 22, 2019

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.

@bookerthegeek

This comment has been minimized.

Copy link

bookerthegeek commented Jan 23, 2019

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

@AlexIIL

This comment has been minimized.

Copy link
Member

AlexIIL commented Jan 23, 2019

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

@bookerthegeek

This comment has been minimized.

Copy link

bookerthegeek commented Jan 23, 2019

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.

@hotarunso31

This comment has been minimized.

Copy link

hotarunso31 commented Jan 29, 2019

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

@Xetaxheb

This comment has been minimized.

Copy link
Author

Xetaxheb commented Jan 29, 2019

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.

@AlexIIL

This comment has been minimized.

Copy link
Member

AlexIIL commented Jan 29, 2019

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.

@AlexIIL

This comment has been minimized.

Copy link
Member

AlexIIL commented Jan 29, 2019

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.

@Xetaxheb

This comment has been minimized.

Copy link
Author

Xetaxheb commented Jan 30, 2019

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?

@AlexIIL

This comment has been minimized.

Copy link
Member

AlexIIL commented Feb 2, 2019

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!

@Xetaxheb

This comment has been minimized.

Copy link
Author

Xetaxheb commented Feb 2, 2019

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment