How to get bone meal effectively by composter?
I need bone meal to fasten the growth of trees because I live in a survival island. I have grown many crops and what crops should I put in the composter to earn bone meal effectively?
The wiki lists all the things you can put into a composter and their probability to increase the fill level inside here (archive). Carrots, beetroot, wheat, potatoes, pumpkins and melons each have a 65% chance, but cooked potatoes have an 85% chance to increase the level. Melon slices have a 50% chance, so putting in full melons isn't worth it. It's also very easy to build a cactus farm, cacti have a 50% chance as well.
But I would not recommend using a composter to get bonemeal. If you build a mob farm, you get many more useful resources (bones, gunpowder, string, ender pearls, occasionally redstone, bottles, glowstone, …, if manual killing also weapons and armour, …) and it runs without any manual activity (you just have to be within 128 blocks) and without needing to sacrifice your crops. In my most active Survival world I almost filled two double chests with bone blocks, just from standing at a skeleton spawner farm for XP.
Of course this does not work if you're playing in "Peaceful" difficulty.