optimizing port fetching with _difference