Library cache latch is usually due to high parsing or small shared pool, as library cache is in the shared pool. Oracle attempts to reuse the application code if it has been executed before. If the parsed representation is in the library cache and it can be shared, Oracle will reuse the code. This is called soft parsing. If there is no parsed representation of the sql in the library cache, then Oracle will need to hard parse the sql. So tune the application to share the sql or increase shared pool if need be.