mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-14 16:40:30 +00:00
Increase buffer size even more when binary querying connections
This commit is contained in:
parent
2bc8d7cd87
commit
d920fddf15
2 changed files with 17 additions and 1 deletions
|
@ -1556,7 +1556,7 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
{
|
||||
}
|
||||
|
||||
private final static int QUERY_TRIPS_BINARY_BUFFER_SIZE = 128 * 1024;
|
||||
private final static int QUERY_TRIPS_BINARY_BUFFER_SIZE = 192 * 1024;
|
||||
|
||||
protected final QueryTripsResult queryTripsBinary(Location from, Location via, Location to, final Date date, final boolean dep,
|
||||
final int numTrips, final Collection<Product> products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
|
|
|
@ -20,6 +20,7 @@ package de.schildbach.pte.live;
|
|||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -214,4 +215,19 @@ public class NvvProviderLiveTest extends AbstractProviderLiveTest
|
|||
LocationType.ANY, 0, null, "Frankfurt Hauptbahnhof!"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void tripUsingMuchBuffer() throws IOException
|
||||
{
|
||||
final QueryTripsResult result = queryTrips(new Location(LocationType.ADDRESS, 0, 50119563, 8697044, null,
|
||||
"Hegelstrasse, 60316 Frankfurt am Main"), null, new Location(LocationType.ADDRESS, 0, 50100364, 8615193, null,
|
||||
"Mainzer Landstrasse, Frankfurt"), new Date(1378368840000l), true, Product.ALL, null, null);
|
||||
System.out.println(result);
|
||||
|
||||
if (!result.context.canQueryLater())
|
||||
return;
|
||||
|
||||
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue